The AND and OR functions are logical functions used to test multiple conditions at the same time. They are often combined with the IF function to create more powerful formulas.
1. AND Function
The AND function returns:
- TRUE → If all conditions are true
- FALSE → If any one condition is false
Structure:
=AND(logical_test1, logical_test2, ...)
Example:
If marks are in A1 and attendance is in B1:
=AND(A1>=40, B1>=75)
Meaning:
- Marks must be 40 or more
- Attendance must be 75% or more
- Both conditions must be true
If both are true → Result = TRUE
If one is false → Result = FALSE
AND with IF Example:
=IF(AND(A1>=40, B1>=75),"Pass","Fail")
Student passes only if both conditions are satisfied.
2. OR Function
The OR function returns:
- TRUE → If at least one condition is true
- FALSE → If all conditions are false
Structure:
=OR(logical_test1, logical_test2, ...)
Example:
=OR(A1>=90, B1="Excellent")
If either condition is true → Result = TRUE
OR with IF Example:
=IF(OR(A1>=90, B1="Excellent"),"Award","No Award")
If marks are high OR performance is excellent → Award
Key Difference Between AND and OR
| AND | OR |
|---|---|
| All conditions must be true | At least one condition must be true |
| Returns FALSE if one condition fails | Returns TRUE if one condition passes |
Practical Example
If:
- A1 = Marks
- B1 = Attendance
Formula:
=IF(AND(A1>=50, B1>=80),"Eligible","Not Eligible")
Student is eligible only if both marks and attendance criteria are met.
Why AND and OR Are Important
They help you:
- Create multiple-condition logic
- Build smart decision systems
- Improve data analysis
- Combine conditions inside IF formulas
AND and OR functions are essential tools for building advanced logical formulas in Excel.