AND, OR and NOT let you test multiple conditions inside IF formulas. AND requires all conditions to be true. OR requires just one. NOT reverses a result.
AND, OR, and NOT are logical functions that let you test multiple conditions at once inside IF formulas. AND returns TRUE only when every condition is true. OR returns TRUE when at least one condition is true. NOT reverses any logical value. They are the building blocks of complex conditional logic in Excel.
=AND(logical1, logical2, ...) =OR(logical1, ...) =NOT(logical)| Argument | Description |
|---|---|
| =AND(logical1, logical2, ...) =OR(logical1, ...) =NOT(logical) | |
| logical1 required | A condition that evaluates to TRUE or FALSE. |
| [logical2] ... optional | Additional conditions. AND/OR accept up to 255 conditions. |
=IF(AND(B2>=50, C2="Attended"), "Pass", "Fail")Both conditions must be true.
=IF(OR(C2="Senior", B2>=90), "Bonus", "Standard")Either condition qualifies.
=IF(NOT(ISNUMBER(MATCH(A2,ValidList,0))), "Invalid", "OK")NOT reverses the TRUE/FALSE result.
=IF(AND(A2="Active",B2>0,C2<TODAY()), "Alert", "")All three must be true to trigger the alert.
=IF(OR(A2="London",A2="Manchester",A2="Birmingham"), "UK City", "Other")Check if a value is one of several options.
The most common use of AND and OR is inside IF formulas — they let you test multiple conditions without writing deeply nested IFs. Instead of =IF(A2="Active",IF(B2>100,"Yes","No"),"No"), you write =IF(AND(A2="Active",B2>100),"Yes","No") — one IF, two conditions, much cleaner.
AND is also used in data validation rules and conditional formatting to apply formatting only when several criteria are met simultaneously. OR is useful in SUMIF and COUNTIF alternatives when you want to match any one of several values.
NOT is less commonly used on its own but becomes powerful combined with other functions. NOT(ISBLANK(A2)) checks whether a cell is non-empty. NOT(ISNUMBER(MATCH(A2,list,0))) checks whether a value is absent from a list.
SUMPRODUCT lets you use AND logic (multiply conditions) or OR logic (add conditions) for conditional sums without SUMIFS: =SUMPRODUCT((A2:A100="North")*(B2:B100="Coffee")*C2:C100) sums Coffee sales in North using AND logic.
ExcelPro has exercises covering this formula across multiple tracks. Free to start.
Try exercises →