AnalystPracticeGuides
DashboardSign up

AND, OR and NOT in Excel: combining conditions

AND is true only if every condition is true. OR is true if at least one is true. NOT flips TRUE and FALSE. On their own they return TRUE or FALSE, so you usually put them inside IF.

Watch it solved. Task 10: why AND() breaks FILTER, and what works, from 7:05, in our video “Excel Interview Questions and Answers: 10 Practical Tasks, Solved”. Pressing play loads the video from YouTube (privacy). Open on YouTube

How do you use AND inside IF?

Bonus only for sales staff with a rating of 4 or more:

=IF(AND(B2="Sales",D2>=4),"Bonus","No bonus")

How do you use OR inside IF?

Flag orders from either North or South:

=IF(OR(A2="North",A2="South"),"North or South","Other")

What does NOT do?

It reverses a test. Everyone except managers:

=IF(NOT(B2="Manager"),"Staff","Manager")

B2<>"Manager" does the same and is shorter.

What about XOR?

XOR is true when an odd number of conditions are true. With two conditions that means exactly one of them. It is rare in business sheets but turns up in tests.

Common mistake: writing conditions the way you say them

=IF(A2="North" OR "South",…) is not valid Excel. Each condition needs its own full test inside OR: OR(A2="North",A2="South").

Can you count or sum with OR?

COUNTIFS and SUMIFS only combine conditions with AND. For OR, add two results together, as in =COUNTIF(A:A,"North")+COUNTIF(A:A,"South").

Try it yourself. Practise this in a real spreadsheet in your browser, with instant feedback.
Practise AND, OR, NOT Practise combined IF

Updated November 2026.

← All free guides