If a row meets all conditions, the formula should return “x”.

If any condition is not true, the formula should return an empty string ("").

This problem can be solved with the IF function together with the OR function and the AND function.

Excel formula: If cell equals

Also, notice that IF automatically returns FALSE even though no value is provided for a false result.

OR function

TheOR functionreturns TRUE if any argument is TRUE.

The formula in cell E5 is:

Note that theOR functionappearsinsidetheAND function.

Excel formula: If cell is this OR that

This means the OR function must return TRUE in order for the AND function to return TRUE.

In other words, the OR function must return a result before the AND function can return a result.

In the end, the IF function returns “x”, because the AND function returns TRUE.

Excel formula: If cell begins with x, y, or z

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

OR returns TRUEif any condition is TRUE.

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

Excel IF function

AND returns TRUEonly if all the conditions are met.

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

Excel OR function

Excel AND function

Article image

Article image