The IFS function in Excel is a powerful tool for evaluating multiple conditions without nesting multiple IF statements. Below are 10 examples of how to use the IFS function, including sample data and formulas.
Example 1: Grading System
Data:
| Student | Score |
|---|---|
| Alice | 85 |
| Bob | 72 |
| Carol | 58 |
Formula:
=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", A2>=60, "D", TRUE, "F")
Result:
Alice: B
Bob: C
Carol: F
Example 2: Sales Commission
Data:
| Salesperson | Sales Amount |
|---|---|
| John | 15000 |
| Jane | 8000 |
| Mike | 25000 |
Formula:
=IFS(B2>20000, B2*0.1, B2>10000, B2*0.075, B2>5000, B2*0.05, TRUE, 0)
Result:
John: 1125 (7.5% of 15000)
Jane: 400 (5% of 8000)
Mike: 2500 (10% of 25000)
Example 3: Discount Calculation
Data:
| Product | Quantity |
|---|---|
| A | 15 |
| B | 25 |
| C | 5 |
Formula:
=IFS(B2>20, "20%", B2>10, "10%", TRUE, "No Discount")
Result:
A: 10%
B: 20%
C: No Discount
Example 4: Employee Bonus
Data:
| Employee | Years of Service |
|---|---|
| Alice | 3 |
| Bob | 7 |
| Carol | 12 |
Formula:
=IFS(B2>=10, "5000", B2>=5, "3000", B2>=1, "1000", TRUE, "No Bonus")
Result:
Alice: 1000
Bob: 3000
Carol: 5000
Example 5: Temperature Classification
Data:
| Day | Temperature (°C) |
|---|---|
| Mon | 28 |
| Tue | 15 |
| Wed | 5 |
Formula:
=IFS(B2>30, "Hot", B2>20, "Warm", B2>10, "Mild", TRUE, "Cold")
Result:
Mon: Warm
Tue: Mild
Wed: Cold
Example 6: Loan Eligibility
Data:
| Applicant | Credit Score |
|---|---|
| Alex | 720 |
| Beth | 650 |
| Chris | 580 |
Formula:
=IFS(B2>=700, "Approved", B2>=600, "Pending Review", TRUE, "Denied")
Result:
Alex: Approved
Beth: Pending Review
Chris: Denied
Example 7: Shipping Cost
Data:
| Order | Weight (kg) |
|---|---|
| 001 | 2 |
| 002 | 5 |
| 003 | 10 |
Formula:
=IFS(B2<=1, 5, B2<=5, 10, B2<=10, 20, TRUE, 30)
Result:
001: 10
002: 10
003: 20
Example 8: Age Group Classification
Data:
| Name | Age |
|---|---|
| Emma | 25 |
| Liam | 45 |
| Noah | 65 |
Formula:
=IFS(B2<18, "Child", B2<35, "Young Adult", B2<60, "Adult", TRUE, "Senior")
Result:
Emma: Young Adult
Liam: Adult
Noah: Senior
Example 9: Product Category
Data:
| Product | Price |
|---|---|
| X | 50 |
| Y | 120 |
| Z | 200 |
Formula:
=IFS(B2<100, "Budget", B2<200, "Mid-Range", TRUE, "Premium")
Result:
X: Budget
Y: Mid-Range
Z: Premium
Example 10: Attendance Status
Data:
| Employee | Days Absent |
|---|---|
| Anna | 2 |
| Ben | 6 |
| Clara | 0 |
Formula:
=IFS(B2=0, "Perfect Attendance", B2<=3, "Good", B2<=5, "Warning", TRUE, "Action Required")
Result:
Anna: Good
Ben: Action Required
Clara: Perfect Attendance
These examples demonstrate the versatility of the IFS function in Excel for handling multiple conditions efficiently.
No comments:
Post a Comment