Confident CellsExcel practice Start free

TRUE, FALSE and logical tests: practice exercises

comparisons, NOT, AND, XOR. 5 exercises on real-looking data, each marked the moment you press Check. The first exercise is below to try now; the full lesson is part of Pro.

Your turn

In D2, show TRUE if the person's sales reached their target (hitting it exactly counts) and FALSE if not. You don't need IF.

ABCD
1EmployeeTargetSalesMet target
2Marek5550
3Tanya4040
4Femi6060
5Jess2028
6Zoe5050
7Ivan6059
8Sunil3522
9Nadia5050
10Chen5567
11Ollie4545

How it works

A comparison such as =B2>=C2 gives TRUE or FALSE. You can show that answer on its own, without IF. TRUE and FALSE are values, not text, so they never go in quotes.

NOT turns TRUE into FALSE and back. AND is TRUE when every test is, OR when at least one is, and XOR when an odd number are: with two tests, exactly one.

=D2>=C2 =NOT(E2) =AND(B2>=10,C2="Yes") =XOR(C2>=B2,C4>=B4)

Tests give TRUE or FALSE

Every comparison is a question with a yes-or-no answer. Type =B2>=C2 and the cell shows TRUE or FALSE.

  • = equal to, <> not equal to
  • > more than, >= at least
  • < less than, <= at most

IF uses a test like this to choose what to show. When TRUE or FALSE is all you need, leave IF out.

Worked example

ABCD
1NameSalesTargetMet?
2Amira5240
3Ben3035
4Cara4545
  1. =B2>=C2 in D2. Is Amira's sales figure at least her target? 52 is more than 40, so TRUE.
  2. =B2>=C2 in D2. Copied down, each row asks its own question. Ben falls short, so FALSE. Cara hits 45 exactly, and >= counts that, so TRUE.

NOT, AND, OR and XOR

  • NOT(D2) flips the answer: TRUE becomes FALSE.
  • AND(test1, test2) is TRUE only when every test is TRUE.
  • OR(test1, test2) is TRUE when at least one test is TRUE.
  • XOR(test1, test2) is TRUE when exactly one of two tests is TRUE, not both.

TRUE and FALSE are values, not words: "TRUE" in quotes is just text. XOR is in Excel 2013 and later, and in Google Sheets.

What you'll practise

  1. In D2, show TRUE if the person's sales reached their target (hitting it exactly counts) and FALSE if not. You don't need IF.
  2. This is a stock check. In D2, show TRUE if the number counted matches the number on the system, and FALSE if it doesn't.
  3. Column C shows TRUE for invoices that have been paid. In D2, use NOT to show TRUE for the invoices that still need chasing, and FALSE for the rest.
  4. People get a bonus if their sales are at least the target in H1 and their attendance is at least the target in H2. In D2, show TRUE or FALSE for each person.
  5. Each expenses claim needs approving by a manager and by finance. Claims that one has approved but the other hasn't need chasing. In D2, use XOR to show TRUE when exactly one of the two has approved.