How to Use AND / OR / NOT Functions in Excel + Tips
Learn how to use AND, OR, NOT logical functions in Excel with clear examples, formulas, and practical tips.
Hello everyone! Today i will show you how to use AND, OR, and NOT logical functions in Microsoft Excel with step by step examples.
These three formulas are very useful when you need to test multiple conditions at the same time in your Excel sheets.
📚 Related Tutorial: Want to master Excel keyboard shortcuts? Check out Learn All Excel Keyboard Shortcuts ↗!
🛠️ Formula Syntax & Parameters
1. AND() Formula
Purpose: Returns TRUE only if ALL conditions are TRUE.
Syntax:
=AND(logical1, [logical2], ...)
logical1, logical2...: Conditions to test (can be formulas or cell references).
2. OR() Formula
Purpose: Returns TRUE if AT LEAST ONE condition is TRUE.
Syntax:
=OR(logical1, [logical2], ...)
logical1, logical2...: Conditions to test.
3. NOT() Formula
Purpose: Reverses the logical result (if TRUE → FALSE, if FALSE → TRUE).
Syntax:
=NOT(logical)
logical: The condition to test.
📋 Sample Data Table (Follow Along)
Create this sample table in cell range A1:C5:
| Row | Column A (Name) | Column B (Gender) | Column C (Status) |
|---|---|---|---|
| 1 | Name | Gender | Status |
| 2 | Dara | Male | Pass |
| 3 | Sokha | Female | Pass |
| 4 | Bopha | Female | Fail |
| 5 | Chann | Male | Fail |
📊 Simple Examples with Formulas
Example 1: AND() – Check if BOTH Gender is Female AND Status is Pass
We want to find rows where Gender is Female AND Status is Pass.
Formula in Cell D2 (drag down):
=AND(B2="Female", C2="Pass")
Results:
- Cell D2:
FALSE(Gender=Male) - Cell D3:
TRUE(Gender=Female AND Status=Pass) - Cell D4:
FALSE(Status=Fail) - Cell D5:
FALSE(Gender=Male)
👉 AND() returns TRUE only when ALL conditions match!
Example 2: OR() – Check if Gender is Male OR Status is Pass
We want to find rows where Gender is Male OR Status is Pass.
Formula in Cell E2 (drag down):
=OR(B2="Male", C2="Pass")
Results:
- Cell E2:
TRUE(Gender=Male) - Cell E3:
TRUE(Gender=Female BUT Status=Pass) - Cell E4:
FALSE(Both conditions are False) - Cell E5:
TRUE(Gender=Male)
👉 OR() returns TRUE if ANY condition matches!
Example 3: NOT() – Invert the Result
We want to find rows where Status is NOT Fail (i.e., Pass).
Formula in Cell F2 (drag down):
=NOT(C2="Fail")
Results:
- Cell F2:
TRUE(C2 is "Pass" → NOT "Fail") - Cell F3:
TRUE(C3 is "Pass" → NOT "Fail") - Cell F4:
FALSE(C4 is "Fail" → NOT "Fail" = False) - Cell F5:
FALSE(C5 is "Fail" → NOT "Fail" = False)
👉 NOT() flips TRUE to FALSE and FALSE to TRUE!
⚡ AND vs OR vs NOT Comparison
| Function | When to Use | Result TRUE if... |
|---|---|---|
| AND() | All conditions must be true | All conditions are TRUE |
| OR() | At least one condition must be true | At least one condition is TRUE |
| NOT() | Reverse or invert a condition | The original condition is FALSE |
🎥 AND / OR / NOT Video Tutorial (Khmer)
Follow this video guide to watch step-by-step tutorial:
💡 Quick Tips for AND / OR / NOT Functions
- Combine with IF: These functions are commonly used inside IF() formulas to handle complex logic:
=IF(AND(B2="Female", C2="Pass"), "Eligible", "Not Eligible") - Use Cell References: Always use cell references (like
B2,C2) instead of hardcoded values to make formulas dynamic. - Count Based on Conditions: You can use
SUM()withAND/ORinside array formulas or withSUMIFS/COUNTIFSfor advanced counting. - Nesting Functions: You can nest these functions inside each other for complex scenarios (e.g.,
OR(AND(...), NOT(...))).
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use LET Function in Excel + Tips
Learn how to use LET function in Excel step-by-step to define variables in formulas with simple examples, benefits, and tips.
How to Use LAMBDA Function in Excel + Tips
Learn how to use LAMBDA function in Excel step-by-step to define variables in formulas with simple examples, benefits, and tips.
How to Use AGGREGATE Function in Excel + Tips
Learn how to use AGGREGATE function in Excel step-by-step to calculate SUM, AVERAGE, MAX, LARGE while ignoring errors and hidden rows.