ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Logic
  3. IF with OR in Excel: Pass When Any Condition Is Met

IF with OR in Excel: Pass When Any Condition Is Met

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To pass when any one of several conditions is true, put OR inside IF: =IF(OR(B2="VIP",C2>=500),"Free shipping", "Standard"). OR returns TRUE if at least one condition is true, and FALSE only when all of them are false. IF then shows the result you choose. Each condition must be written in full, even when it tests the same cell.

Key takeaways

  • The shape is =IF(OR(condition1, condition2), value_if_true, value_if_false).
  • OR is TRUE when at least one condition is true; it is FALSE only when every condition is false.
  • Repeat the cell in every condition: OR(B2="North",B2="South"), not OR(B2="North","South").
  • Combine OR with AND for rules like 'VIP, or a big order that is paid'.
  • To count rows that match any of several values, add COUNTIFs together.
On this page+
  1. How OR works on its own
  2. How to write IF with OR, step by step
  3. How to check if a cell equals one of several values
  4. How to use IF OR with numbers
  5. How to combine OR with AND
  6. Using NOT to flip a condition
  7. How to count rows that meet any condition
  8. Common IF OR mistakes
  9. Practise it

An IF or formula in Excel returns one result when at least one of several conditions is true. You put OR inside IF: =IF(OR(test1, test2), "Yes", "No"). If any test passes, you get the first result; only when they all fail do you get the second. This guide builds the formula on a shipping table, then covers checking one cell against several values, combining OR with AND, and the mistakes that cause errors.

How OR works on its own#

OR takes a list of conditions and returns TRUE if any one of them is true. It returns FALSE only when every condition is false.

Excel formula
=OR(logical1, [logical2], ...)
Condition 1Condition 2OR result
TRUETRUETRUE
TRUEFALSETRUE
FALSETRUETRUE
FALSEFALSEFALSE

Compare this with AND, which needs every condition to be true. OR accepts up to 255 conditions. Excel also has XOR, an "exclusive or" that returns TRUE when an odd number of conditions are true; with two conditions, that means exactly one of them. It's rarely needed, but it's handy for rules like "one discount or the other, not both". The lesson on AND, OR and NOT lets you practise all three, and the OR function guide is a quick reference.

How to write IF with OR, step by step#

The examples use this order table in A1:C6. An order ships free if the customer is a VIP or the order is worth 500 or more:

ABC
1OrderCustomerValue
2A101VIP120
3A102Regular650
4A104VIP40
5A103Regular80
6A105Regular499
  1. Click D2 and type =IF(OR(.
  2. Type the first condition, B2="VIP", then a comma.
  3. Type the second condition, C2>=500, and close the OR bracket.
  4. Add the results, "Free shipping","Standard", and close the IF bracket.
Excel formula
=IF(OR(B2="VIP",C2>=500),"Free shipping","Standard")

Fill down to D6 (Windows: Ctrl+D; Mac: ⌘D). A101 and A104 are free because the customer is a VIP, even though A104 is only worth 40. A102 is free because it's worth 650. A103 and A105 fail both tests and show Standard. A105 is worth 499, just under the limit, which is why >=500 and not >500 matters at the edges.

How to check if a cell equals one of several values#

Repeat the cell reference in every condition. Each part of OR must be a complete test.

Excel formula
=IF(OR(B2="North",B2="South"),"Southern team","Other")

A very common mistake is to write OR(B2="North","South"). The second part is just the word South, not a comparison, so OR can't read it as TRUE or FALSE, and the formula returns #VALUE!.

For a long list of values, a shorter form uses an array constant in curly brackets:

Excel formula
=IF(OR(B2={"North","South","East"}),"Yes","No")

Excel compares B2 with each value in the list, and OR returns TRUE if any comparison matches. You type the curly brackets yourself; this works in all current versions of Excel. For checking whether a cell contains a word, rather than equals it, see IF with text.

How to use IF OR with numbers#

OR is handy for flagging values outside a safe range: too low or too high.

Excel formula
=IF(OR(C2<100,C2>1000),"Check","OK")

Only values under 100 or over 1,000 are flagged. On the order table, A104 (40) and A103 (80) show Check, while A101, A102 and A105 show OK. This is the mirror image of a "between" test, which uses AND; see IF between two numbers.

How to combine OR with AND#

Nest them when a rule has both "any of" and "all of" parts. Say an order ships free if the customer is a VIP, or if it's worth 500 or more and already paid (column E):

Excel formula
=IF(OR(B2="VIP",AND(C2>=500,E2="Paid")),"Free shipping","Standard")

Read it from the inside out. AND is TRUE only for big, paid orders. OR is TRUE if the customer is a VIP or that AND is true. The brackets decide which conditions belong together, so check them carefully. For the AND side on its own, read IF with AND.

Using NOT to flip a condition#

NOT turns TRUE into FALSE and FALSE into TRUE. It's useful when "none of these" is easier to say than "any of these".

Excel formula
=IF(NOT(OR(B2="VIP",C2>=500)),"Charge shipping","")

This shows Charge shipping only when the customer is not a VIP and the order is under 500. It's the same as =IF(AND(B2<>"VIP",C2<500),"Charge shipping",""). Use whichever reads more clearly.

How to count rows that meet any condition#

COUNTIFS works with AND logic only. For OR logic, add separate COUNTIFs together:

Excel formula
=COUNTIF(B2:B6,"VIP")+COUNTIF(C2:C6,">=500")

This gives 2 + 1 = 3. Be careful: if a VIP also had an order of 500 or more, that row would be counted twice. When the conditions can overlap, add a helper column with the IF OR formula and count its results with =COUNTIF(D2:D6,"Free shipping") instead.

Common IF OR mistakes#

Check these when the formula misbehaves:

  1. Incomplete conditions. OR(B2="North","South") fails. Write OR(B2="North",B2="South").
  2. OR when you need AND. If every condition must be true, use AND.
  3. Brackets closed too late. Close OR before the true and false results: IF(OR(a,b),"Yes","No").
  4. Text without quotes. B2=VIP returns #NAME?. Write B2="VIP".
  5. Blank cells. A blank cell can make a "less than" test TRUE, because Excel treats it as 0. Check for blanks first; see IF cell is blank.

The IF function guide and the IF function explained simply cover the basics if you need a refresher.

Practise it#

IF with OR appears in most Excel screening tests, often right next to IF with AND to check you know the difference. Practise AND, OR and NOT in a live spreadsheet: you type the formula and it checks it instantly. Then practise the IF function, and try the intermediate Excel test when you're ready.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Orders ship free if the customer is a VIP or the order is worth 500 or more. Click D4 and write an IF with OR that shows Free or Standard for order A104.

fx
ABCDE
1
Order
Customer
Value
Shipping
2
A101
VIP
120
3
A102
Regular
650
4
A104
VIP
40
5
A103
Regular
80
6
A105
Regular
499
7
8
9

Tip: OR(B4="VIP", C4>=500) is the test. Then "Free", then "Standard".

Practise this in a lesson

LessonAND, OR and NOTCheck several conditions at once with AND and OR, flip a result with NOT, and combine them inside IF.LessonThe IF functionMake a cell show one result or another depending on a condition, like Pass/Fail or Over/Under budget.Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.Function guideORReturn TRUE when any condition is met with Excel's OR. Flag tickets, match one of several values and combine OR with IF. Practice it live.

Frequently asked questions

How do I use IF with OR in Excel?

+

Put OR as the first argument of IF: =IF(OR(B2="VIP",C2>=500),"Free shipping","Standard"). The cell shows Free shipping if either condition is true.

How do I check if a cell equals one of several values?

+

Repeat the cell in each condition: =IF(OR(B2="North",B2="South",B2="East"),"Yes","No"). A shorter form is =IF(OR(B2={"North","South","East"}),"Yes","No").

What is the difference between IF OR and IF AND?

+

IF with OR returns the true result when any condition is true. IF with AND returns it only when every condition is true.

Can I use OR and AND in the same IF formula?

+

Yes. Nest one inside the other, for example =IF(OR(B2="VIP",AND(C2>=500,D2="Paid")),"Ship free","Charge"). Brackets decide which conditions belong together.

Why does my IF OR formula return #VALUE!?

+

A common cause is writing OR(B2="North","South"). The second part is plain text, not a test, so OR can't read it as TRUE or FALSE. Write B2="South" in full.

Sources

  • IF function - Microsoft Support
  • OR function - Microsoft Support
  • NOT function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How OR works on its own
  2. How to write IF with OR, step by step
  3. How to check if a cell equals one of several values
  4. How to use IF OR with numbers
  5. How to combine OR with AND
  6. Using NOT to flip a condition
  7. How to count rows that meet any condition
  8. Common IF OR mistakes
  9. Practise it

Keep reading

Logic· 6 min read

IF with AND in Excel: Check Two Conditions at Once

To check two conditions at once, put AND inside IF: =IF(AND(B2>=80000,C2>=95%),"Bonus","No bonus"). AND returns TRUE only when every condition inside it is true, and IF turns that into the result you choose. You can list up to 255 conditions in AND, separated by commas. If any one is false, IF returns the false result.

Logic· 7 min read

IF Between Two Numbers in Excel

To check if a number is between two values in Excel, combine IF with AND: =IF(AND(B2>=1,B2<=5),"Standard","Other"). AND needs both tests to be true: at least the lower limit and at most the upper limit. Use > and < instead to leave out the limits themselves. Excel has no BETWEEN function, so you always write both tests.

Logic· 6 min read

The Excel IF Function Explained Simply

The Excel IF function checks a condition and returns one value when it's TRUE and another when it's FALSE. The syntax is =IF(logical_test, value_if_true, value_if_false). For example, =IF(B2>=70,"Pass","Fail") shows Pass for a score of 70 or more and Fail for anything lower. Text results go in double quotes.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free