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 AND in Excel: Check Two Conditions at Once

IF with AND in Excel: Check Two Conditions at Once

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

The short answer

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.

Key takeaways

  • The shape is =IF(AND(condition1, condition2), value_if_true, value_if_false).
  • AND returns TRUE only when every condition is true; one FALSE makes the whole test FALSE.
  • Write each comparison in full: AND(B2>=10,B2<=20), never 10<=B2<=20.
  • Mix AND with OR when some conditions are alternatives: AND(B2>=80000, OR(C2="Gold",C2="Silver")).
  • For more than two outcomes, nest IFs or use IFS, each with its own AND.
On this page+
  1. How AND works on its own
  2. How to write IF with AND, step by step
  3. How to check if a number is between two values
  4. How to combine text and number conditions
  5. How to mix AND with OR
  6. IF AND with more than two outcomes
  7. AND beyond IF: counting and highlighting
  8. Common IF AND mistakes
  9. Practise it

An IF and formula in Excel checks two or more conditions at once and returns one result only when all of them are true. You put AND inside IF: =IF(AND(test1, test2), "Yes", "No"). AND does the checking and IF chooses what to show. This guide builds the formula on a bonus table, then covers number ranges, text, dates, mixing AND with OR, and the mistakes that cause wrong results.

How AND works on its own#

AND takes a list of conditions and returns TRUE only if every one is true. If even one is false, AND returns FALSE.

Excel formula
=AND(logical1, [logical2], ...)
Condition 1Condition 2AND result
TRUETRUETRUE
TRUEFALSEFALSE
FALSETRUEFALSE
FALSEFALSEFALSE

On its own, AND only shows TRUE or FALSE. Wrapping it in IF lets you show words, numbers or calculations instead. The lesson on AND, OR and NOT practises these building blocks, and the AND function guide is a quick reference.

How to write IF with AND, step by step#

The examples use this table in A1:C6. A bonus needs sales of at least 80,000 and attendance of at least 95%:

ABC
1EmployeeSalesAttendance
2Aiko85,00097%
3Bruno92,00088%
4Carmen64,00099%
5Dmitri110,00095%
6Esther78,00092%
  1. Click D2 and type =IF(AND(.
  2. Type the first condition, B2>=80000, then a comma.
  3. Type the second condition, C2>=95%, and close the AND bracket.
  4. Add the two results, "Bonus","No bonus", and close the IF bracket.
Excel formula
=IF(AND(B2>=80000,C2>=95%),"Bonus","No bonus")

Fill down to D6 (Windows: Ctrl+D; Mac: ⌘D). Aiko and Dmitri get Bonus. Bruno has the sales but not the attendance, Carmen has the attendance but not the sales, and Esther misses both, so they show No bonus.

Dmitri's attendance is exactly 95%, and >= includes it. With > he would miss out. The guide to IF greater than explains that difference.

How to check if a number is between two values#

A range check is the most common use of AND: the value must be above a lower limit and below an upper limit.

Excel formula
=IF(AND(B2>=60000,B2<=90000),"Mid band","Outside")

Aiko (85,000) and Esther (78,000) are in the mid band. Write each comparison in full. The maths-style 60000<=B2<=90000 doesn't work in Excel: it compares the first part, gets TRUE or FALSE, then compares that with 90000, and returns the wrong answer without any error. See IF between two numbers for more range examples.

How to combine text and number conditions#

AND can mix any kinds of conditions, as long as each one returns TRUE or FALSE. Text goes in double quotes.

Excel formula
=IF(AND(B2="North",C2>=500),"Priority","Standard")

This flags orders that are from the North region and worth 500 or more. Text comparisons aren't case-sensitive, so north and NORTH also match. For partial text matches, such as "contains North", see IF with text.

To make sure a cell isn't empty before you test it, add a not-blank condition: =IF(AND(B2<>"",C2>=500),"Priority",""). The guide to IF cell is blank covers blank checks in detail.

How to mix AND with OR#

Use OR inside AND when some conditions are alternatives. Say a bonus needs sales of at least 80,000 and a grade of either Gold or Silver in column E:

Excel formula
=IF(AND(B2>=80000,OR(E2="Gold",E2="Silver")),"Bonus","No bonus")

Read it from the inside out: OR is TRUE if the grade is Gold or Silver; AND is TRUE if that and the sales test are both true. Brackets keep each part separate. For more on OR, read IF with OR.

IF AND with more than two outcomes#

For tiers, nest IFs, putting the strictest test first. Each test can have its own AND:

Excel formula
=IF(AND(B2>=100000,C2>=95%),"Gold",IF(AND(B2>=80000,C2>=90%),"Silver","None"))

Dmitri (110,000 and 95%) gets Gold. Aiko (85,000 and 97%) gets Silver. Bruno has the sales for Silver but 88% attendance, so he gets None. In Excel 2019 and later, IFS does the same with less nesting: =IFS(AND(B2>=100000,C2>=95%),"Gold",AND(B2>=80000,C2>=90%),"Silver",TRUE,"None").

AND beyond IF: counting and highlighting#

AND isn't only for IF. Two related tasks come up often in reports and tests.

Counting rows that meet both conditions. You don't need a helper column of IF formulas. COUNTIFS checks several conditions directly:

Excel formula
=COUNTIFS(B2:B6,">=80000",C2:C6,">=0.95")

This returns 2 (Aiko and Dmitri). SUMIFS and AVERAGEIFS work the same way for totals and averages.

Highlighting rows. In conditional formatting, choose "Use a formula to determine which cells to format" and enter the AND test on its own, without IF: =AND($B2>=80000,$C2>=95%). Every row where it returns TRUE gets the colour. The $ before the column letters keeps each row checking columns B and C.

You may also see =IF((B2>=80000)*(C2>=95%),"Bonus","No bonus"). Multiplying TRUE and FALSE values gives 1 only when both are TRUE, so it acts like AND. It works, but AND is easier to read.

Common IF AND mistakes#

Check these when the results look wrong:

  1. Chained comparisons. 10<=B2<=20 gives wrong answers silently. Use AND(B2>=10,B2<=20).
  2. Brackets in the wrong place. Close AND before the true and false results: IF(AND(a,b),"Yes","No").
  3. Percent as a whole number. If attendance is stored as 0.95, test C2>=95% or C2>=0.95, not C2>=95.
  4. Text passed straight to AND. AND(C2,...) where C2 holds "Yes" returns #VALUE!. Compare it: C2="Yes".
  5. Using AND when you mean OR. If any one condition should be enough, you need OR.

The IF function guide and the article on the IF function explained simply cover the IF side in more depth.

Practise it#

IF with AND is one of the most tested formulas in Excel job assessments, because it checks logic and syntax together. Practise AND, OR and NOT in a live spreadsheet: you type the formula and it checks it instantly. Then practise the IF function on its own, 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.

A bonus needs sales of at least 80,000 and attendance of at least 95%. Click D5 and write an IF with AND that shows Bonus or No bonus for Dmitri.

fx
ABCDE
1
Employee
Sales
Attendance
Bonus?
2
Aiko
85000
0.97
3
Bruno
92000
0.88
4
Carmen
64000
0.99
5
Dmitri
110000
0.95
6
Esther
78000
0.92
7
8
9

Tip: AND(B5>=80000, C5>=0.95) is the test. Then "Bonus", then "No bonus".

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 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.

Frequently asked questions

How do I use IF with AND in Excel?

+

Put AND as the first argument of IF: =IF(AND(B2>=80000,C2>=0.95),"Bonus","No bonus"). Both conditions must be true for the cell to show Bonus.

How many conditions can AND check?

+

Up to 255. Separate them with commas inside AND. Every one must be true for AND to return TRUE.

What is the difference between AND and OR in an IF formula?

+

AND needs every condition to be true. OR needs at least one to be true. Use AND for must-have rules and OR for any-of rules.

Why does my IF AND formula return #VALUE!?

+

Usually one of the conditions points at text that AND can't read as TRUE or FALSE, such as a cell with the word Yes. Compare it instead, for example C2="Yes", so AND receives a TRUE or FALSE value.

Can I use IF AND with dates?

+

Yes. Compare the date cell with DATE values: =IF(AND(B2>=DATE(2026,1,1),B2<=DATE(2026,12,31)),"2026","Other").

Sources

  • IF function - Microsoft Support
  • AND 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 AND works on its own
  2. How to write IF with AND, step by step
  3. How to check if a number is between two values
  4. How to combine text and number conditions
  5. How to mix AND with OR
  6. IF AND with more than two outcomes
  7. AND beyond IF: counting and highlighting
  8. Common IF AND mistakes
  9. Practise it

Keep reading

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.

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