mayo 04, 2026

Week 31 – Logical Functions: IF() with AND() and OR()

CLASS OBJECTIVE

Understand how AND() and OR() can be combined with IF() to evaluate multiple conditions and generate automatic results in spreadsheets.

This allows spreadsheets to make more complex decisions.


3 advanced Google Sheets functions: IFERROR, IF & DATEDIF | Geckoboard blog

CLASS AGENDA

Introduction
How to make decisions with more than one condition.

Short Review
IF() function and comparison operators.

Explanation
How AND() and OR() work.

Demonstration
Using IF() with multiple conditions.

Practice Activity
Students apply logical functions.

Homework
Practice decision-making with multiple conditions.


1. Introduction

Sometimes one condition is not enough.

Example:

A student passes only if:

  • Grade ≥ 70
  • Attendance ≥ 80

How can a spreadsheet evaluate both conditions at the same time?

We use AND() and OR().


2. Short Review

Remember:

IF() Structure

=IF(condition, value_if_true, value_if_false)

The spreadsheet:

  1. Evaluates a condition
  2. Returns TRUE or FALSE
  3. Shows a result

3. What is AND()?

AND() returns TRUE only if ALL conditions are true.

Example

=AND(A1>=70,B1>=80)

This means:

  • Grade ≥ 70
  • Attendance ≥ 80

👉 Both must be true.


4. IF() with AND()

=IF(AND(A1>=70,B1>=80),"Passed","Failed")

The spreadsheet checks:

  1. Grade ≥ 70
  2. Attendance ≥ 80

✔ If both are true → Passed
✘ If not → Failed


5. What is OR()?

OR() returns TRUE if at least one condition is true.

Example

=OR(A1>=90,B1="Excellent")

This means:

  • High grade
    OR
  • Excellent evaluation

👉 Only one needs to be true.


6. IF() with OR()

=IF(OR(A1>=90,B1="Excellent"),"Reward","No reward")

✔ If at least one condition is true → Reward
✘ If not → No reward


7. Real-Life Example – Scholarship System

This is where it clicks fast for students.

Pass condition:

  • Grade ≥ 85
  • Attendance ≥ 90
=IF(AND(A1>=85,B1>=90),"Scholarship","No scholarship")

Reward condition:

  • Grade ≥ 95
    OR
  • Perfect attendance
=IF(OR(A1>=95,B1=100),"Reward","No reward")

8. Demonstration (Google Sheets)

How To Use the IF Function in Google Sheets (Examples & Screenshots)

Students observe:

  1. Writing formulas with AND() and OR()
  2. Combining them with IF()
  3. Copying formulas
  4. Changing values and watching results update

Students notice how spreadsheets evaluate multiple conditions instantly.


9. Practice Activity

Students will work with a dataset (grades + attendance).

They must:

  1. Create one formula using IF() + AND()
  2. Create one formula using IF() + OR()
  3. Generate results such as:
    • Passed / Failed
    • Scholarship / No scholarship
    • Reward / No reward

10. Homework

Create a spreadsheet with at least 10 rows of data.

Upload to Google Classroom.


11. Notes in Your Notebook

Answer:

  1. What does AND() do?
  2. What does OR() do?
  3. What is the difference between AND() and OR()?
  4. When would you use AND()?
  5. When would you use OR()?

KEYWORDS

IF()
A function that makes decisions.

AND()
Returns TRUE if all conditions are true.

OR()
Returns TRUE if at least one condition is true.

Logical Function
A function that evaluates conditions.

Condition
A logical test.

TRUE / FALSE
Possible results of a condition.

Multiple Conditions
More than one rule evaluated at the same time.