How to use IF with multiple conditions in Excel
Formula (Excel and Google Sheets)
=IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus")Put the conditions in AND (all must be true) or OR (any can be true) inside IF: =IF(AND(cond1,cond2),"yes","no").
- Result on the example
- one result per row in
D2, filled down toD7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in D2, filled down to D7. Change any input and the result updates, or edit the formula to experiment.
How it works
AND returns TRUE only when every test inside it is TRUE, and IF turns that into a label. The targets are locked with $ so they stay put when the formula is filled down, while B2 and C2 move to each row.
=IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus")Result"Bonus"
B2$62,000The value in B2.
$G$1$50,000The value in G1.
B2>=$G$1TRUEThe >= operator tests at least.
C24The value in C2.
$G$24The value in G2.
C2>=$G$2TRUEThe >= operator tests at least.
AND(B2>=$G$1,C2>=$G$2)TRUEAND: TRUE if every argument is true.- logical1
B2>=$G$1TRUE - logical2
C2>=$G$2TRUE
- logical1
IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus")"Bonus"IF: Returns one value if a test is true, another if false.- logical_test
AND(B2>=$G$1,C2>=$G$2)TRUE - value_if_true
"Bonus" - value_if_false
"No bonus"not used
- logical_test
In Google Sheets
The same formula works in Google Sheets: =IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus"). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF((B2>=$G$1)*(C2>=$G$2),"Bonus","No bonus") | Bonus, No bonus, No bonus… | Multiplying the tests is the same as AND. Adding them (+) is the same as OR. |
| =IF(OR(B2>=$G$1,C2>=$G$2),"Bonus","No bonus") | Bonus, Bonus, Bonus…Different result | Use OR when meeting either condition is enough. Any rep who meets either target gets a bonus. |
Common mistakes
=IF(B2>=50000 AND C2>=4,…)isn't valid. AND is a function:AND(B2>=50000,C2>=4).- Without the $ signs, filling down shifts the targets to empty cells and every row says "No bonus".
- "Between" needs both ends:
AND(B2>=40000,B2<=60000), not40000<=B2<=60000.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Use IF with multiple conditions
D2, show "Bonus" when the rep met the sales target in G1 and the minimum rating in G2, otherwise "No bonus". Fill down to D7.Questions
How do I combine AND and OR?
Nest them: =IF(AND(B2>=$G$1,OR(C2=5,C2=4)),"Bonus","No bonus").
How many conditions can AND take?
Up to 255. For many different outcomes, use IFS instead of nesting IFs.
Checked by running on 2026-10-29: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.