Course contents · Logical functions

AND, OR, NOT and IFERROR

Open the practice in the trainer →

AND(cond1, cond2, …)TRUE if all conditions are true
OR(cond1, cond2, …)TRUE if at least one is true
NOT(cond)turns TRUE into FALSE and vice versa
IFERROR(formula, fallback)returns the fallback instead of an error

Logical functions are usually nested inside IF:

=IF(AND(B2>=4,C2>=90%),"Bonus","—")

IFERROR hides errors like #DIV/0! and #N/A, but use it consciously: it also hides real errors in your model.

Tasks in the trainer

  1. In F2:F6: “Bonus” if rating ≥ 4 and target ≥ 90%, otherwise “—”.
  2. In G2:G6: “Yes” if rating ≤ 2 or target < 80%, otherwise “No”.
  3. In H2:H6: average deal = Sales / Deals; return 0 on a division error.
  4. In I2:I6: “Yes” if the rating is not below 3 (use NOT), otherwise “No”.
  5. In B8 count how many employees get a bonus (column F).

Solve the tasks in the trainer →

Check yourself

  1. What does =AND(TRUE,FALSE,TRUE) return?
  2. What does =NOT(OR(1>2,3>4)) return?