Compares the two sides and returns TRUE or FALSE.
- Left side
B2- Right side
7070
A nested IF assigns a tier by testing the highest threshold first and moving down until a condition passes. Here a score of 76 reaches the Fine tier.
Compares the two sides and returns TRUE or FALSE.
B27070Compares the two sides and returns TRUE or FALSE.
B28080Returns one value when a condition is true and another when it's false
B2>=70The condition that you want to test. It can be an expression, a value, or a cell reference."Fine"The value or formula to return if the logical test evaluates to TRUE."Needs work"The value or formula to return if the logical test evaluates to FALSE.Compares the two sides and returns TRUE or FALSE.
B29090Returns one value when a condition is true and another when it's false
B2>=80The condition that you want to test. It can be an expression, a value, or a cell reference."Good"The value or formula to return if the logical test evaluates to TRUE.IF(B2>=70,"Fine","Needs work")The value or formula to return if the logical test evaluates to FALSE.Returns one value when a condition is true and another when it's false
B2>=90The condition that you want to test. It can be an expression, a value, or a cell reference."Excellent"The value or formula to return if the logical test evaluates to TRUE.IF(B2>=80,"Good",IF(B2>=70,"Fine","Needs work"))The value or formula to return if the logical test evaluates to FALSE.The score misses 90 and 80, then passes 70. Excel returns Fine and leaves the final Needs work fallback unused.
The rows above are ordered from the innermost calculation to the final result. Excel has to finish an inner function before the function around it can use that value. Edit a cell in the grid to see that dependency chain update for real.
The sample spreadsheet is fully editable. Change the formula or any cell it references. The intermediate values recalculate in your browser.
Here is an exercise that uses IF. Type the formula into a real spreadsheet and we will check your answer as you go.
Calculate a 10% bonus if sales exceed target, otherwise 0.
Open exerciseIf this formula is not doing what you expect, one of these is usually why.
Excel stops at the first TRUE test, so a loose threshold placed before a strict one swallows everything. Put the highest threshold first and work downward.
A nested IF ended up beside the previous one instead of inside its false branch. Each IF needs three arguments and its own closing parenthesis.
The value_if_false argument is missing. Add the third argument, even if it is only an empty pair of quotes.
IFS often reads more easily once you have several ordered thresholds. Nested IF remains useful when each level needs an explicit fallback.