Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Data Analysis with Excel Functions ยท Lesson 5 of 9

Module Four

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
5

Module 4: Logical Functions in Excel

Module Introduction

Imagine you are a teacher checking the examination results of students in a secondary school in Lagos. To qualify for an award, a student must score at least 70 marks in Mathematics and English.

Checking every student's results manually can take a long time. Fortunately, Microsoft Excel has logical functions that can help you check conditions and make decisions automatically.

In this module, you will learn how to use AND, OR, and NOT functions to analyse information and make decisions in Excel.

Learning Objectives

By the end of this module, you should be able to:

  • Explain what logical functions mean in Excel.
  • Understand the difference between TRUE and FALSE.
  • Use the AND function to check multiple conditions.
  • Use the OR function to check whether at least one condition is true.
  • Use the NOT function to reverse a logical result.
  • Combine logical functions with the IF function.

1. Understanding Logical Functions

Logical functions help Excel make decisions by checking whether something is true or false.

For example, imagine your school says that students must score 50 marks or more to pass an examination.

  • A score of 75 produces TRUE because it is greater than or equal to 50.
  • A score of 35 produces FALSE because it is less than 50.

Excel uses logical results to help you analyse information and automate decisions.

2. Understanding the AND Function

The AND function checks two or more conditions. It returns TRUE only when all the conditions are true.

If even one condition is false, the AND function returns FALSE.

AND Function Syntax

=AND(logical1, logical2, ...)

Each logical argument is a condition that Excel must check.

Example: Checking Examination Scores

A school in Ibadan wants students to score at least 50 marks in both Mathematics and English to qualify for a special class.

Student Mathematics English
Ade7580
Chika6540
Tunde4570
Fatima9085

Assume Mathematics scores are in column B and English scores are in column C. Enter this formula in D2:

=AND(B2>=50,C2>=50)

The results will be:

StudentMathematicsEnglishAND Result
Ade7580TRUE
Chika6540FALSE
Tunde4570FALSE
Fatima9085TRUE

Ade and Fatima meet both conditions. Chika and Tunde do not.

3. Understanding the OR Function

The OR function checks two or more conditions. It returns TRUE if at least one condition is true.

It returns FALSE only when all the conditions are false.

OR Function Syntax

=OR(logical1, logical2, ...)

Example: Checking Students' Eligibility

Imagine a school gives an award to students who score at least 90 in Mathematics or at least 90 in English.

Enter this formula in D2:

=OR(B2>=90,C2>=90)
StudentMathematicsEnglishOR Result
Ade7580FALSE
Chika9540TRUE
Tunde4592TRUE
Fatima9085TRUE

Chika, Tunde, and Fatima qualify because each student scored at least 90 in one of the two subjects.

4. Understanding the NOT Function

The NOT function changes TRUE to FALSE and FALSE to TRUE. It reverses a logical result.

Think of it as telling Excel to check the opposite of a condition.

NOT Function Syntax

=NOT(logical)

Example: Checking Students Who Have Not Passed

Assume a student passes when the score is 50 or more. The score is stored in cell B2.

Enter:

=NOT(B2>=50)

If the score is 75, the condition B2>=50 is TRUE, so NOT changes the result to FALSE.

If the score is 35, the condition is FALSE, so NOT changes the result to TRUE.

5. Combining AND with IF

You can combine logical functions with IF to make Excel display words instead of only TRUE or FALSE.

For example, a school may decide that a student must score at least 50 in both Mathematics and English to pass both subjects.

Enter this formula:

=IF(AND(B2>=50,C2>=50),"Qualified","Not Qualified")

Excel first checks both conditions using AND. It then uses IF to display Qualified if both conditions are true, or Not Qualified if either condition is false.

6. Combining OR with IF

You can also combine OR with IF when only one of several conditions needs to be true.

Imagine a company gives a transport allowance to employees who live in either Lagos or Ibadan.

Assume the employee's city is stored in cell B2. Enter:

=IF(OR(B2="Lagos",B2="Ibadan"),"Allowance Approved","Not Eligible")

If the employee lives in Lagos or Ibadan, Excel displays Allowance Approved. If the employee lives in another city, it displays Not Eligible.

7. Practical Business Example

Imagine a supermarket in Lagos wants to identify products that need restocking.

The manager decides that a product needs restocking if its quantity is below 10 units or its quantity is exactly 10 units.

ProductQuantity Available
Rice25
Milk5
Soap10
Bread8

Enter this formula in C2:

=IF(OR(B2<10,B2=10),"Restock","Stock Available")

The results will be:

ProductQuantityDecision
Rice25Stock Available
Milk5Restock
Soap10Restock
Bread8Restock

8. Difference Between AND, OR, and NOT

FunctionWhat It DoesExample
AND Returns TRUE when all conditions are true. =AND(A2>=50,B2>=50)
OR Returns TRUE when at least one condition is true. =OR(A2>=50,B2>=50)
NOT Reverses a TRUE or FALSE result. =NOT(A2>=50)

9. Common Mistakes to Avoid

  • Using AND when you only need one condition to be true.
  • Using OR when every condition must be true.
  • Forgetting to close brackets in a formula.
  • Using the wrong cell references.
  • Forgetting quotation marks around text such as "Qualified".
  • Assuming AND, OR, and NOT display words automatically. They normally return TRUE or FALSE unless combined with functions such as IF.

10. Practical Exercise

A secondary school in Ibadan wants to identify students who qualify for a special mathematics programme.

A student must score at least 60 in Mathematics and at least 50 in English to qualify.

StudentMathematicsEnglish
David7565
Mary8545
John5570
Grace9080
Peter4035

Your Tasks

  1. Use AND to check whether each student meets both conditions.
  2. Use IF and AND together to display Qualified or Not Qualified.
  3. Use OR to identify students who scored at least 80 in either subject.
  4. Use NOT to reverse the result of a check that a student scored at least 50 in Mathematics.
  5. Copy your formulas down to apply them to all five students.

Module Summary

In this module, you learned about three important logical functions in Excel:

  • AND: Checks whether all conditions are true.
  • OR: Checks whether at least one condition is true.
  • NOT: Reverses a TRUE or FALSE result.

You also learned how to combine AND and OR with IF to make Excel display useful decisions automatically.

What Is Next?

In Module 5, you will learn about Text Functions for Data Analysis. You will discover how to join names, extract parts of text, change letter cases, remove unwanted spaces, and clean information in Excel.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’