The OR function in Excel
OR checks several conditions and returns TRUE if at least one of them is true. It returns FALSE only when all of them are false.
Use it for "either… or…" rules: VIP customers or big orders get free shipping; Saturdays or Sundays count as the weekend.
Syntax
=OR(logical1, [logical2], …)
| Argument | What it means |
|---|---|
| logical1 | The first condition, e.g. B2="VIP". |
| logical2, …optional | More conditions. Up to 255. |
Examples
1. Is at least one condition met?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Tier | Spent | Priority |
| 2 | Rina | Standard | 1250 | TRUE |
Rina isn't a VIP, but she spent more than 1,000. One true condition is enough.
2. Inside IF: free shipping
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Tier | Order | Shipping |
| 2 | Omar | VIP | 40 | Free |
The order is small, but Omar is a VIP, so shipping is free.
3. One of several allowed values
| A | B | |
|---|---|---|
| 1 | Day | Sun |
| 2 | Weekend? | TRUE |
Repeat the cell in each condition. =OR(B1="Sat","Sun") doesn't work.
Common mistakes
Leaving out the cell in later conditions, e.g.
=OR(B1="Sat","Sun"). The second condition is just the text "Sun", not a comparison.Fix: Write the full comparison every time: B1="Sat", B1="Sun".
Using OR where all conditions must hold.
Fix: Use AND when every condition is required.
Frequently asked questions
Can I combine AND and OR?
Yes: =AND(B2>=18,OR(C2="Yes",D2="Yes")) means "adult, and at least one of the two consents".
How do I count rows that match one value or another?
Add two counts: =COUNTIF(B2:B6,"North")+COUNTIF(B2:B6,"East").