A nested IF function:

In the Excel 2007 course, in Lesson 35, you can see how the IF function works.
The IF function displays a certain value as a result of the specified condition being TRUE and another value if it is FALSE.
The structure of the function is: IF (logical test, value if true, value if false).
However, we can use the IF function, repeatedly, in a formula.

= IF (logical test, value if true, IF (logical test, value if true, IF (logical test, value if true, value if false)))

You can use the IF function up to 64 times as a nested function!!

In the example we will assign ratings to the points scored by pupils.

Type the following formula in cell H2: = IF (G2 <= 60; “insufficient”, IF (G2 <= 70; “Enough”, IF (G2 <= 80; “Good”, “Very good”))) Copy it down the column of pupils with the fill handle .

The formula works as follows:
IF the value in cell G2 is less than or equal to 60, the result is shown as “insufficient”;
IF the value in cell G2 is less than or equal to 70, the result is shown as “Enough”;
IF the value in cell G2 is less than or equal to 80, the result is shown as “good” or “very good”.

Note: The text in a formula is always enclosed in double quotation marks “”!

Awesome!
You've completed Tip 018
START NEXT LESSON