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

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Comparisons
  3. AND vs OR in Excel: All Conditions or Any

AND vs OR in Excel: All Conditions or Any

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

The short answer

AND returns TRUE only when every condition is true. OR returns TRUE when at least one condition is true. Use AND for strict rules, like sales of 50,000 or more and a rating of 4 or more. Use OR for "either" rules. Both usually sit inside IF, as in =IF(AND(B2>=50000,C2>=4),"Bonus","No").

Key takeaways

  • AND: every condition must be TRUE. OR: at least one condition must be TRUE.
  • Both take up to 255 conditions, separated by commas, and return TRUE or FALSE.
  • Put them inside IF to return words or numbers instead of TRUE and FALSE.
  • Inside FILTER and other array formulas, use * for AND and + for OR; the AND and OR functions return a single value.
On this page+
  1. AND vs OR at a glance
  2. How AND and OR decide: the truth table
  3. The same data, tested both ways
  4. When to use AND
  5. When to use OR
  6. Using AND and OR together
  7. Common mistakes with AND and OR
  8. Our recommendation
  9. Practise it

The short answer to AND vs OR in Excel: AND is TRUE only when all of its conditions are true, and OR is TRUE when any of them is true. AND makes a rule stricter with every condition you add; OR makes it looser. This guide compares them on the same staff data, shows how each works inside IF and FILTER, and covers the mistakes that trip people up in job tests.

AND vs OR at a glance#

Both functions test conditions and return TRUE or FALSE. The difference is how many conditions must pass.

FeatureANDOR
Returns TRUE whenEvery condition is TRUEAt least one condition is TRUE
Returns FALSE whenAny condition is FALSEEvery condition is FALSE
Syntax=AND(logical1, [logical2], ...)=OR(logical1, [logical2], ...)
Maximum conditions255255
Effect of adding a conditionFewer rows passMore rows pass
Everyday words"both", "all", "and also""either", "any", "at least one"
Inside FILTER or array formulasUse * between conditionsUse + between conditions
Excel versionsAll versionsAll versions

A condition, also called a logical test, is any expression that gives TRUE or FALSE, such as B2>=50000 or D2="North".

How AND and OR decide: the truth table#

With two conditions, there are only four combinations. This table shows what each function returns:

Condition 1Condition 2ANDOR
TRUETRUETRUETRUE
TRUEFALSEFALSETRUE
FALSETRUEFALSETRUE
FALSEFALSEFALSEFALSE

AND and OR agree only when both conditions are the same. When one is TRUE and the other FALSE, AND says FALSE and OR says TRUE. That middle part of the table is where choosing the wrong function changes your answer. A few details matter when conditions point at cells rather than comparisons:

  • Numbers count as logical values. 0 is FALSE and any other number is TRUE, so =AND(1,5) is TRUE and =OR(0,0) is FALSE.
  • Empty cells and text in a referenced range are ignored. =AND(E2:E5) only looks at the TRUE and FALSE values in that range. If the range holds no logical values at all, the result is #VALUE!.
  • Errors spread. If any condition returns an error, such as #N/A from a lookup, AND and OR return that error too, even when another condition would already decide the answer.

The AND function guide and the OR function guide list the full rules.

The same data, tested both ways#

Here is a list of sales staff:

ABCD
1NameSalesRatingRegion
2Amara62,0004North
3Ben48,0005South
4Chloe51,0003North
5Dev39,0002East
6Eva75,0005West
7Femi45,0004South

Rule 1 with AND: sales of 50,000 or more and a rating of 4 or more#

Excel formula
=AND(B2>=50000,C2>=4)

Filled down, this returns TRUE only for Amara and Eva. Ben has the rating but not the sales. Chloe has the sales but a rating of 3. Two of six people pass.

Rule 2 with OR: sales of 50,000 or more or a rating of 4 or more#

Excel formula
=OR(B2>=50000,C2>=4)

Now five people pass: everyone except Dev, who misses both conditions. Same two conditions, very different result.

Turning TRUE and FALSE into labels with IF#

On its own, AND or OR shows TRUE or FALSE. Wrap it in IF to show something more useful:

Excel formula
=IF(AND(B2>=50000,C2>=4),"Bonus","No")
=IF(OR(B2>=50000,C2>=4),"Review","")

The first shows Bonus for Amara and Eva. The second marks five people for a review and leaves Dev blank. The guides to the IF AND formula and the IF OR formula have more examples of each pattern.

Counting rows that pass#

COUNTIFS uses AND logic: every condition must match. =COUNTIFS(B2:B7,">=50000",C2:C7,">=4") returns 2. For OR, add two COUNTIFs and subtract the rows counted twice: =COUNTIF(B2:B7,">=50000")+COUNTIF(C2:C7,">=4")-COUNTIFS(B2:B7,">=50000",C2:C7,">=4") gives 3 + 4 − 2 = 5.

When to use AND#

Use AND when every condition is required. Listen for the words "both", "all" and "and also":

  • Eligibility rules: a bonus needs high sales and a good rating.
  • Ranges between two numbers: =AND(B2>=40000,B2<=60000) is TRUE when sales are from 40,000 to 60,000. Ben, Chloe and Femi pass. The guide to IF between two numbers covers this in detail.
  • Data checks: a row is complete only if the name, date and amount are all filled in: =AND(A2<>"",B2<>"",C2<>"").
  • Conditional formatting rules: select A2:D7, choose Home > Conditional Formatting > New Rule > Use a formula, and enter =AND($B2>=50000,$C2>=4) with a green fill. Amara's and Eva's rows light up. The $ before B and C keeps every cell in the row checking the same two columns.

When to use OR#

Use OR when any one condition is enough. Listen for "either", "any" and "at least one":

  • Several accepted values: a region is in the southern team if it's South or West: =OR(D2="South",D2="West").
  • Warning flags: flag a row if sales are low or the rating is low: =OR(B2<40000,C2<3) flags only Dev.
  • Alternative routes: a candidate qualifies with a degree or five years' experience.
  • Finding gaps: =OR(B2="",C2="",D2="") is TRUE when any of the three cells is empty, a quick way to spot incomplete rows before you share a report. It's the mirror image of the AND data check above.

For "one or the other, but not both", use XOR instead. The guide to the XOR function explains how it differs from OR.

Using AND and OR together#

Real rules often mix both. Nest one function inside the other. For example, staff in the North or South region with sales of at least 45,000:

Excel formula
=AND(OR(D2="North",D2="South"),B2>=45000)

The OR checks the region, then AND adds the sales condition. Amara, Ben, Chloe and Femi pass: 4 people. Dev and Eva fail the region test.

Read nested formulas from the inside out, and say the rule in words before you type it. "North or South, and at least 45,000" maps directly onto the formula. The guide to AND, OR and NOT adds NOT, which flips TRUE and FALSE, for rules like "any region except East".

Common mistakes with AND and OR#

These are the slips that most often give wrong answers:

  1. Choosing by the word in the question, not the logic. "Staff in North and South" usually means staff in either region, which is OR. No one is in both regions at once, so AND would return FALSE for everyone.
  2. Writing the cell once for two tests. =OR(D2="North","South") doesn't work. Repeat the cell: =OR(D2="North",D2="South").
  3. Using AND or OR inside FILTER. =FILTER(A2:A7,AND(B2:B7>=50000,C2:C7>=4)) fails, because AND returns one value for the whole range. Use (B2:B7>=50000)*(C2:C7>=4) instead, which returns Amara and Eva. Use + for OR. FILTER needs Excel 2021 or Microsoft 365.
  4. Writing maths-style ranges. =40000<=B2<=60000 doesn't work in Excel. Use =AND(B2>=40000,B2<=60000).
  5. Forgetting quotes around text. D2=North gives #NAME?. Write D2="North".

Our recommendation#

Choose by how many conditions must be true. If all of them must be true, use AND. If any one is enough, use OR. When a rule has both kinds, nest them, and write the rule in plain words first. In FILTER and other array formulas, swap the functions for * (AND) and + (OR). If you're unsure which one a rule needs, test it on a row that meets only one condition, like Ben or Chloe here, and check that the result matches what the rule intends.

In short: AND for all, OR for any.

Practise it#

Try the exercise on this page: an IF with AND that pays a bonus only when both conditions are met. Then practise AND, OR and NOT in a live spreadsheet, where you combine conditions and check your answers instantly.

Try it yourself

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

The bonus rule is: sales of 50,000 or more AND a rating of 4 or more. In E2, use IF with AND to return Bonus for Amara if she meets both conditions, or No if not.

fx
ABCDEF
1
Name
Sales
Rating
Region
2
Amara
62000
4
North
3
Ben
48000
5
South
4
Chloe
51000
3
North
5
Dev
39000
2
East
6
Eva
75000
5
West
7
Femi
45000
4
South
8
9
10

Tip: The test is AND(B2>=50000,C2>=4). Then give IF the two results in quotes: "Bonus" and "No".

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.Function guideANDCheck that every condition is true with Excel's AND. Use it inside IF for bonuses, ranges and eligibility rules, then try a live exercise.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

What is the difference between AND and OR in Excel?

+

AND returns TRUE only if all its conditions are true. OR returns TRUE if any one of its conditions is true. With conditions A and B, AND needs both, while OR needs either.

Can I use AND and OR together in one formula?

+

Yes. Nest one inside the other, for example =AND(OR(D2="North",D2="South"),B2>=45000). This is TRUE when the region is North or South and sales are at least 45,000.

How do I use AND and OR with IF?

+

Put AND or OR as the first argument of IF: =IF(OR(B2>=50000,C2>=4),"Yes","No"). IF then returns Yes when the OR test is TRUE and No when it is FALSE.

Why doesn't AND work inside FILTER?

+

AND combines every value in a range into one TRUE or FALSE, so FILTER can't use it row by row. Multiply the conditions instead: =FILTER(A2:A7,(B2:B7>=50000)*(C2:C7>=4)). Use + for OR.

How many conditions can AND and OR test?

+

Up to 255 conditions each. In practice, if you need more than four or five, a helper column or a lookup table is usually easier to read.

Sources

  • AND function - Microsoft Support
  • OR function - Microsoft Support
  • IF 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. AND vs OR at a glance
  2. How AND and OR decide: the truth table
  3. The same data, tested both ways
  4. When to use AND
  5. When to use OR
  6. Using AND and OR together
  7. Common mistakes with AND and OR
  8. Our recommendation
  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

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

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.

More on comparisons

  • AVERAGE vs MEDIAN: Which Tells the Truth?
  • AVERAGEIF vs AVERAGEIFS: Argument Order Matters
  • CEILING vs FLOOR in Excel: Round Up or Down to a Step
  • CHOOSE vs SWITCH in Excel
  • CONCATENATE vs CONCAT vs TEXTJOIN vs &
  • COUNT vs COUNTA vs COUNTBLANK
All comparisons articles →

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