Excel practice · Basics

AND, OR & XOR practice exercises

5 graded problems with realistic data, from easy to medium.

The boolean building blocks. Combine multiple TRUE/FALSE conditions into one, or flip a condition around. The 5 exercises below come from LearnExcel's practice library. Each one gives you a realistic table, a cell to fill, and a hint if you get stuck. Read them here, then solve them in the interactive grid, where your formula is checked the moment you press Enter.

New to the function? Read the AND, OR & XOR guide first: syntax, a worked example and the mistakes people make.

In this set

  1. Flag scholarship eligibility
  2. Flag whether the trip needs a rain plan
  3. Flag an unusual door state
  4. Flag whether a support ticket is still open
  5. Set a manual unavailable flag during audit

The exercises

1. Flag scholarship eligibility Medium

The merit scholarship requires a GPA of 3.5 or higher AND attendance of 90% or higher. Check whether Maya qualifies.

ABCD
1StudentGPAAttendance %Eligible
2Maya3.792?

Enter a formula in D2.

Show a hint

AND(condition1, condition2) is true only when every condition is true: =AND(B2>=3.5,C2>=90).

AND is how a spreadsheet enforces "all of these must hold." Eligibility rules almost always stack more than one requirement.

2. Flag whether the trip needs a rain plan Medium

The hiking club needs a backup plan if the rain chance is above 50% OR wind speed is above 25 mph. Check Saturday.

ABCD
1DayRain %Wind (mph)Rain Plan?
2Saturday3032?

Enter a formula in D2.

Show a hint

OR(condition1, condition2) is true if at least one condition is true: =OR(B2>50,C2>25).

OR is for "any one of these is enough." Trip planning, alerts, and approvals all lean on this pattern.

3. Flag an unusual door state Medium

A store's security system should flag an alert only when exactly one of the two doors is open. Both closed or both open is normal during restocking. Check the current state.

ABCD
1StoreFront Door (1=open)Back Door (1=open)Alert?
2Store #1210?

Enter a formula in D2.

Show a hint

XOR(condition1, condition2) is true only when exactly one side is true, not both, not neither: =XOR(B2=1,C2=1).

XOR is the "exactly one, not both" logic, useful whenever two states should normally move together and a mismatch is what matters.

4. Flag whether a support ticket is still open Medium

The Closed column uses 1 for closed and 0 for still open. Check whether ticket #552 is still open.

ABC
1TicketClosed (1=yes)Open?
2#5520?

Enter a formula in C2.

Show a hint

NOT(condition) flips a condition's result: =NOT(B2=1).

NOT is handy for reading a flag "backwards," turning a Closed column into an Open one without adding a new source column.

5. Set a manual unavailable flag during audit Easy

The warehouse is doing a full inventory audit this week, so every item should show as unavailable for order no matter what the stock count says. Hardcode the Available flag for this item.

ABC
1ItemStockAvailable for order?
2Gadget42?

Enter a formula in C2.

Show a hint

TRUE and FALSE are literal boolean values you can type directly. No cell reference needed: =FALSE (or =FALSE()).

Sometimes a flag needs to be a fixed override rather than the result of a calculation. TRUE/FALSE literals do that directly.

Solve these in a real grid

Type your formula, get graded instantly. Your first 10 exercises are free, no signup.

Start the AND, OR & XOR exercises →

More basics practice

All Excel practice exercises · Excel test prep