# How to use IF with multiple conditions in Excel

Put the conditions in AND (all must be true) or OR (any can be true) inside IF: =IF(AND(cond1,cond2),"yes","no").

**Excel:** `=IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- |
| Rep | Sales | Rating | Bonus? |  | Sales target | 50000 |
| Ana | 62000 | 4 |  |  | Minimum rating | 4 |
| Ben | 48500 | 5 |  |  |  |  |
| Cara | 71200 | 3 |  |  |  |  |
| Dev | 50000 | 4 |  |  |  |  |
| Eli | 55800 | 5 |  |  |  |  |
| Fay | 39900 | 2 |  |  |  |  |

Formula in D2, filled to D7: `=IF(AND(B2>=$G$1,C2>=$G$2),"Bonus","No bonus")`

Result: Bonus; No bonus; No bonus; Bonus; Bonus; No bonus

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

## Other ways

- `=IF((B2>=$G$1)*(C2>=$G$2),"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")`: 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)`, not `40000<=B2<=60000`.

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

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-29.

Source: https://spreadsheetpractice.com/formulas/if-with-multiple-conditions
