The “false result” is the following IF statement.

Notice the final false result will “catch” any case that fails all previous tests.

The AND function inside eachIF functiontests both color and value.

Excel formula: Nested IF function example

Note you’re able to useAlt + Enterto enter new lines in the formula bar.

You’ll need toexpand the formula bar verticallyto see more than one line at a time.

More conditions

This formula approach can be expanded to evaluate more options.

Excel formula: IF with boolean logic

You could also replace AND and OR withboolean logic.

Finally, you might also use theIFS functionin later versions of Excel to reduce nesting.

More than one condition can be tested by nesting IF functions.

Excel IF function

AND returns TRUEonly if all the conditions are met.

If any conditions are not met, the AND function returns FALSE.

OR returns TRUEif any condition is TRUE.

Excel AND function

If all conditions are FALSE, the OR function returns FALSE.

Excel OR function

Article image

Article image

Article image