Course contents · Excel functions

Logical functions

Open the practice in the trainer →

Logical functions let a formula make decisions.

IF(condition, if_true, if_false)one of two results
IFS(cond1, value1, cond2, value2, …)the first condition that holds; TRUE, "otherwise" is often added at the end
AND(cond1, cond2, …)TRUE if all conditions hold
OR(cond1, cond2, …)TRUE if at least one holds
IFERROR(formula, replacement)shows the replacement if the formula returns an error

AND and OR usually go inside IF: =IF(AND(B2>1000, C2>=3), "yes", "no"). Empty text "" leaves the cell visually blank.

Tasks in the trainer

  1. In D2:D7: "Bonus" if sales are over 1000, otherwise "No".
  2. In E2:E7 assign a category: from 1500 — "A", from 1000 — "B", otherwise "C".
  3. In F2:F7: "yes" if sales are over 1000 and experience is at least 3 years, otherwise "no".
  4. In G2:G7: "check" if sales are under 500 or experience is 0, otherwise empty text "".
  5. In H2:H7 divide sales by years; where years is 0 and you get an error, show 0.

Solve the tasks in the trainer →