#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
Module 10
5 min

AND & OR Functions

Check multiple conditions at once

AND & OR Functions

Need to check more than one condition? AND and OR are your friends!

When Do You Need These?

Real life examples:

  • Give bonus IF sales > 100 AND rating > 4
  • Approve loan IF income > 50000 OR has guarantor
  • Pass student IF attendance > 75% AND score > 40

AND Function

Returns TRUE only if ALL conditions are true.

Formula

=AND(condition1, condition2, condition3, ...)

How AND Works

Condition 1Condition 2AND Result
TRUETRUETRUE
TRUEFALSEFALSE
FALSETRUEFALSE
FALSEFALSEFALSE
4 rows

Think of AND as: Everyone must agree = TRUE

Example

Check if student passed: Score > 40 AND Attendance > 75

=AND(A1>40, B1>75)

Score (A1)Attendance (B1)Result
6580TRUE
6560FALSE
3590FALSE
3550FALSE
4 rows

AND Function Example


OR Function

Returns TRUE if ANY condition is true.

Formula

=OR(condition1, condition2, condition3, ...)

How OR Works

Condition 1Condition 2OR Result
TRUETRUETRUE
TRUEFALSETRUE
FALSETRUETRUE
FALSEFALSEFALSE
4 rows

Think of OR as: Anyone agrees = TRUE

Example

Eligible for discount: Member = "Yes" OR Purchase > 100

=OR(A1="Yes", B1>100)

Member (A1)Purchase (B1)Result
Yes50TRUE
No150TRUE
Yes200TRUE
No50FALSE
4 rows

OR Function Example


AND vs OR

FunctionReturns TRUE whenExample
ANDALL conditions are trueA>5 AND B>5 → both must be >5
ORANY condition is trueA>5 OR B>5 → either one >5 is enough
2 rows

Using AND/OR with IF

This is where the magic happens! Combine them with IF.

AND + IF

=IF(AND(condition1, condition2), "Yes", "No")

Example: Give bonus if Sales > 100 AND Rating > 4

=IF(AND(A1>100, B1>4), "Bonus", "No Bonus")

Sales (A1)Rating (B1)Result
1505Bonus
1503No Bonus
805No Bonus
803No Bonus
4 rows

OR + IF

=IF(OR(condition1, condition2), "Yes", "No")

Example: Free shipping if Member OR Purchase > 100

=IF(OR(A1="Yes", B1>100), "Free Ship", "Pay Ship")

Member (A1)Purchase (B1)Result
Yes50Free Ship
No150Free Ship
No50Pay Ship
3 rows

IF with AND OR


Multiple Conditions

You can check many conditions at once!

3 conditions with AND:

=AND(A1>50, B1>50, C1>50)

All three must be > 50

3 conditions with OR:

=OR(A1="Red", A1="Blue", A1="Green")

Any one color matches = TRUE


Common Mistakes

1. Forgetting to repeat cell reference

=AND(A1>10, <20)

=AND(A1>10, A1<20)

2. Using wrong function

  • Need ALL true? → Use AND
  • Need ANY true? → Use OR

3. Forgetting quotes for text

=OR(A1=Yes, A1=No)

=OR(A1="Yes", A1="No")


Summary

  • AND = ALL conditions must be TRUE
  • OR = ANY condition can be TRUE
  • Combine with IF: =IF(AND(...), "yes", "no")
  • Can check many conditions at once
  • Always repeat cell reference in each condition
SkillsetMaster - AI, Web Development & Data Analytics Courses