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.

Advertisement
Formula
=AND(logical1, [logical2], ...) =OR(logical1, [logical2], ...) =NOT(logical)

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:

RowColumn A (Name)Column B (Gender)Column C (Status)
1NameGenderStatus
2DaraMalePass
3SokhaFemalePass
4BophaFemaleFail
5ChannMaleFail

📊 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!

Advertisement

⚡ AND vs OR vs NOT Comparison

FunctionWhen to UseResult TRUE if...
AND()All conditions must be trueAll conditions are TRUE
OR()At least one condition must be trueAt least one condition is TRUE
NOT()Reverse or invert a conditionThe 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

  1. Combine with IF: These functions are commonly used inside IF() formulas to handle complex logic:
    =IF(AND(B2="Female", C2="Pass"), "Eligible", "Not Eligible")
    
  2. Use Cell References: Always use cell references (like B2, C2) instead of hardcoded values to make formulas dynamic.
  3. Count Based on Conditions: You can use SUM() with AND/OR inside array formulas or with SUMIFS/COUNTIFS for advanced counting.
  4. Nesting Functions: You can nest these functions inside each other for complex scenarios (e.g., OR(AND(...), NOT(...))).

📚 Related Resources & Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement