Course / Logic & Decisions

AND, OR and NOT

Combine several conditions into one test, on their own or inside IF. Intermediate · 5 min · AND, OR, NOT, IF + AND/OR

Real decisions often depend on more than one thing. These three functions combine TRUE/FALSE tests:

On their own they return TRUE or FALSE. Put them in IF's test to turn several conditions into one decision.

Steps

  1. Under-18s and over-65s swim at a concession rate. In E2:E9, use OR to test whether the age is under 18 or 65 or over.

  2. A loyalty reward goes to swimmers who are members and have visited at least 12 times this month. Use AND in F2:F9.

  3. Concession tickets cost $4.50 and standard tickets $7. In G2:G9, put your OR test straight inside an IF to show each swimmer's price.

  4. Non-members who have visited 4 or more times should get a membership offer. In H2:H9, show Send offer for them and nothing ("") for everyone else. Use NOT to flip the member test: NOT(C2="Yes").

Remember

Previous: Nested IF and IFS · Next: IFERROR and IFNA