Explanation

The goal is to do something if a cell equals a given value.

The most common way to solve this problem is with the IF function.

Note that Excel is not case-sensitive by default.

IF function example - increase price 10% if color is Red

The expressions below will all return TRUE:

If you need a case-sensitive formula, see theEXACT function.

It can be a cell reference or another formula.

For example, let’s say you want to increase the price of Red items only by 10%.

IF function example - increase price 10% if color is Red

If the result is TRUE, we multiply the original price by 1.1 (i.e.

increase the price by 10%).

If the result is FALSE, we return an empty string ("").

IF function example - increase price 10% if color is Red

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

The IF…

The IF function

If this OR that

IF function example - increase price 10% if color is Red

IF function example - increase price 10% if color is Red

Excel formula: If cell is this OR that

Excel formula: If cell contains

Excel formula: If this AND that

Excel formula: If this AND that OR that

Excel IF function

Article image

Article image