LearnExcelIF
LOGIC

IF

Return one result when a condition is true and another when it is false.

After this lessonCreate clear business status flags.

How it works

IF turns a business rule into a formula. The first argument is a logical test, followed by the result for TRUE and the result for FALSE.

Keep nested IF formulas shallow. When logic grows, consider lookup tables, IFS or a data-model approach that is easier to audit.

REAL WORK

Flag low stock, late orders, price increases or missing confirmations.

SYNTAX

The pattern

=IF(condition, value_if_true, value_if_false)

Example

=IF(B2<20,"REORDER","OK")
TRY IT

Test the formula

The sample sheet is local to this page. Change the formula and see the result immediately.

fx
Result
QUICK CHECK

What is the first argument of IF?

Progress is stored only in this browser. No account required.