If the coloris"Red" OR “Green”, we want to display nothing.

IF function logic

TheIF functionis commonly used for simple tests.

Otherwise, return “Fail”.

Increase price if color is NOT red or green

If the coloris"Red" or “Green” we don’t want to do anything.

TheNOT functionsimply reverses this result.

Since we want to flag items that pass the test, we provide “x” forvalue_if_true.

Increase price if color is NOT red or green

you’re able to extend the OR function to check additional conditions as needed.

Also, notice that we need to provide an empty string ("") for the false result.

If the color is Red or Green, you want to leave the price alone.

Increase price if color is NOT red or green

Otherwise, return the original price.

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

OR returns TRUEif any condition is TRUE.

Increase price if color is NOT red or green

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

When given TRUE, NOT returns FALSE.

When given FALSE, NOT returns TRUE.

Increase price if color is NOT red or green

Use the NOT function to reverse a logical value.

The IF function

If this OR that

Excel formula: If cell is this OR that

Excel formula: If cell equals

Excel formula: If this AND that

Excel formula: If this AND that OR that

Excel IF function

Excel OR function

Excel NOT function

Article image

Article image