Friday, 31 January 2025

ifs

 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:

StudentScore
Alice85
Bob72
Carol58

Formula:

excel
Copy
=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:

SalespersonSales Amount
John15000
Jane8000
Mike25000

Formula:

excel
Copy
=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:

ProductQuantity
A15
B25
C5

Formula:

excel
Copy
=IFS(B2>20, "20%", B2>10, "10%", TRUE, "No Discount")

Result:

  • A: 10%

  • B: 20%

  • C: No Discount


Example 4: Employee Bonus

Data:

EmployeeYears of Service
Alice3
Bob7
Carol12

Formula:

excel
Copy
=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:

DayTemperature (°C)
Mon28
Tue15
Wed5

Formula:

excel
Copy
=IFS(B2>30, "Hot", B2>20, "Warm", B2>10, "Mild", TRUE, "Cold")

Result:

  • Mon: Warm

  • Tue: Mild

  • Wed: Cold


Example 6: Loan Eligibility

Data:

ApplicantCredit Score
Alex720
Beth650
Chris580

Formula:

excel
Copy
=IFS(B2>=700, "Approved", B2>=600, "Pending Review", TRUE, "Denied")

Result:

  • Alex: Approved

  • Beth: Pending Review

  • Chris: Denied


Example 7: Shipping Cost

Data:

OrderWeight (kg)
0012
0025
00310

Formula:

excel
Copy
=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:

NameAge
Emma25
Liam45
Noah65

Formula:

excel
Copy
=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:

ProductPrice
X50
Y120
Z200

Formula:

excel
Copy
=IFS(B2<100, "Budget", B2<200, "Mid-Range", TRUE, "Premium")

Result:

  • X: Budget

  • Y: Mid-Range

  • Z: Premium


Example 10: Attendance Status

Data:

EmployeeDays Absent
Anna2
Ben6
Clara0

Formula:

excel
Copy
=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