=IF(test1, result1, IF(test2, result2, IF(test3, result3, else_result)))
| Argument | Required | Description |
|---|---|---|
| test1 | Required | The first condition to evaluate. If true, result1 is returned and the rest of the formula is ignored. If false, the formula moves to the nested IF in the value_if_false position. |
| result1 | Required | The value to return when test1 is true. Can be text, a number, a blank, or a formula. |
| test2 | Required | The second condition, tested only when test1 is false. Works the same as test1. |
| else_result | Required | The final value to return when all conditions are false. This is the catch-all that handles any rows that did not match any of the tested conditions. |
| A | B | C | |
|---|---|---|---|
| 1 | Student | Score | Grade |
| 2 | Alice | 94 | =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C","F"))) |
| 3 | Bob | 82 | B |
| 4 | Carol | 71 | C |
| 5 | David | 68 | F |
| 6 | Eve | 90 | A |
| 7 | Frank | 55 | F |
| 8 | Grace | 88 | B |
| 9 | Hank | 79 | C |
| 10 | Iris | 96 | A |
| 11 | James | 73 | C |
| A | B | C | |
|---|---|---|---|
| 1 | Order | Weight (kg) | Delivery Tier |
| 2 | ORD-001 | 0.5 | =IF(B2<1,"Free",IF(B2<=5,"Standard",IF(B2<=20,"Express","Freight"))) |
| 3 | ORD-002 | 3.2 | Standard |
| 4 | ORD-003 | 18.5 | Express |
| 5 | ORD-004 | 0.8 | Free |
| 6 | ORD-005 | 45.0 | Freight |
| 7 | ORD-006 | 1.0 | Standard |
| 8 | ORD-007 | 6.1 | Express |
| 9 | ORD-008 | 0.3 | Free |
| 10 | ORD-009 | 21.0 | Freight |
| 11 | ORD-010 | 4.9 | Standard |
| A | B | C | |
|---|---|---|---|
| 1 | Applicant | Credit Score | Risk Level |
| 2 | Alice Chen | 780 | =IF(B2>=750,"Low",IF(B2>=650,"Moderate",IF(B2>=550,"High","Very High"))) |
| 3 | Bob Smith | 690 | Moderate |
| 4 | Carol Jones | 520 | Very High |
| 5 | David Kim | 750 | Low |
| 6 | Eve Taylor | 610 | High |
| 7 | Frank Brown | 820 | Low |
| 8 | Grace Lee | 545 | Very High |
| 9 | Hank Patel | 670 | Moderate |
| 10 | Iris Wong | 580 | High |
| 11 | James Miller | 640 | Moderate |
=IF(B2<=1,"Standard",IF(B2<=10,"Express","Freight"))
=IF(C2<30,"Low",IF(C2<70,"Medium","High"))
=IF(D2>=50000,D2*0.15,IF(D2>=30000,D2*0.10,D2*0.05))
=IF(A2="SLS","Sales",IF(A2="MKT","Marketing",IF(A2="ENG","Engineering","Other")))
=IF(B2>=100000,"Enterprise",IF(B2>=10000,"Large",IF(B2>=1000,"Medium","Small")))
=IFS(A1>=90,"A",A1>=80,"B",A1>=70,"C",TRUE,"F")
=VLOOKUP(A2,GradeTable,2,TRUE)
=IF(B2>=90,"A", IF(B2>=80,"B", IF(B2>=70,"C","F")))