IF — Excel guide

The decision-maker: test a condition, return one thing when true and another when false. Everything conditional in Excel starts here.

IF

Return one value when a test passes, another when it fails.

  • Branches can calculate: =IF(A2>100, A2*0.9, A2) applies a discount conditionally.
  • Nested IFs resolve at the FIRST true test — order thresholds high-to-low, or switch to IFS.
  • Text comparison ignores case ("yes" matches "YES"); use EXACT when case matters.
  • The 1/0 flag pattern =IF(cond, 1, 0) makes conditions summable and multipliable downstream.
  • Guard division: =IF(B2=0, "", A2/B2).

All Excel guides & practice on Excelympics