EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Excel Excel Resources Logical Functions in Excel Tutorial Excel Logical Test
 

Excel Logical Test

Madhuri Thakur
Article byMadhuri Thakur

Updated August 19, 2023

Logical Functions in Excel

 

 

Introduction to Logical Test in Excel

A logical test means the system will check for a given condition, and if that logic is satisfied, it will display the results according to logic in Excel.

Logic is anything we check; suppose if a student secures more than 35 marks, we can consider it a pass; otherwise, fail. An employee should get a bonus if his salary is from 25k to 30k. like this, we can check for any logic in the real world and execute the results accordingly. To perform these results, Excel has multiple logical functions. With the help of those functions, we can perform our logical tests in Excel.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Available Excel logical functions are IF, AND, OR, NOT, XOR, etc.

How to Use Logical Functions in Excel?

The logical Test in Excel is very simple and easy to use. Let’s understand how to use logical functions in Excel.

You can download this Logical Test Excel Template here – Logical Test Excel Template

#1 – IF Function

Suppose the function checks for the given condition and provides results as per condition satisfaction. Consider a small condition; if the age is greater than 50, the result should be Eligible for a pension; otherwise, it should not be eligible for a pension.

First, understand the IF syntax. Below is the screenshot of the IF syntax.

IF Formula in Excel

If you observe, the first is a logical test which is the condition that should satisfy in Excel. The second is Value_If_True means what to print if the condition is true. Last is Value_if_false, what to print if the condition is false.

Now input the data and apply the formula in cell B2 as below.

Logical Functions IF

The output will be as given below.

Logical Test Example 1-2

Drag the Formula to the rest of the cells.

Result of IF Logical Function

We can observe that wherever the age is greater than 60, the results are “Eligible for Pension”. If it is less than 60, “Not eligible for pension”.

In addition to IF, there is Nested IF, and we can also write multiple logics as per requirements.

#2 – AND Function

AND logical test is used in Excel to check whether two conditions are satisfied. We will see the syntax of AND when we give =AND in any cell; we can find the syntax below.

AND Formula in Excel

In the picture, we can observe the syntax as logic 1, logic 2, and so on. How much logic there will be, all should be satisfied; only the results will be “True”.

Now we will apply the formula to the small logic shown in the picture. We want to know the candidates A, B, and C who cleared two tests with more than 50 marks. If both tests secured more than 50, then it will display “True”; otherwise, “False”.

The Formula is applied to cell D2.

Logical Functions AND

The output will be as given below.

Logical Test Example 2-2

Drag the Formula to the rest of the cells.

Result of AND Logical Function

Observe the above picture B2 is greater than 50, and C2 is greater than 50; hence it is “True”. If we observe candidate B who secured less than 50 in Test 1 and greater than 50 in Test 2, however, as per AND logic, both logics should satisfy, then only the result will be “True”. Since candidate A satisfied both logics, hence it is “True”. We can use “AND” logic for better logics application with the combination of “IF”.

#3 – OR Function

OR logical test in Excel will give results if anyone logic or condition satisfies. If both the conditions are false, then the results will be false.

Below is a picture of OR syntax.

OR Formula in Excel

If we observe the syntax, it is logic1, logic2, and so on, like AND logic, but all the logic should satisfy any logic here. We will consider the same AND logic, and both the tests should secure more than 50, then only True. In OR logic, if any One test secures greater than 50, it will be True.

Logical Functions OR

The output will be as given below.

Logical Test Example 3-2

Drag the Formula to the rest of the cells.

Logical Test Example 3-3

Observe the red color box formula and the results in column D. All are “True” because all candidates secured greater than 50 in at least one test.

Logical Test Example 3-4

Change the values of the two tests to less than 50 and observe for any candidate.

Result of OR Logical Function

As the results of both tests are less than 50, it is “False”. OR can also be used with the combination of IF for better logic applications.

#4 – XOR Function

XOR logical excel function works in such a way if any One logic satisfies, it will give the result as True if both the logics are satisfied, or if both are not satisfied, then it will be False. If we want the results to be True, only a single condition should satisfy.

The syntax of XOR is similar to OR. We need to add X at the beginning.

XOR Formula in Excel

We will use the same example to apply XOR too.

Logical Functions XOR

The output will be as given below.

Logical Test Example 4-2

Drag the Formula to the rest of the cells.

Result of XOR Logical Function

Observe the formula and observe the results. When Candidate A satisfies Test1 and Test2 with more than 50, Falsesimilarly Candidate C does not satisfy both tests, hence False. Candidate B not secured more than 50 in test 1 but secured more than 50 in test 2, so the condition was satisfied hence True.

#5 – NOT Function

The NOT logical test in Excel returns False when the condition is satisfied and True when the condition is not satisfied. Let’s see the syntax of NOT and how we can use it.

NOT Formula in Excel

We can observe it only has logic that needs to check. Now we will apply it to a situation where we can use it. Suppose we want to display false for voting if the age is less than 18.

Logical Functions NOT

The output will be as given below.

Logical Test Example 5-2

Drag the Formula to the rest of the cells.

Result of NOT Logical Function

Observe the above picture. If the Age is less than or equal to 18, it is giving False if the age is greater than 18, it returns True. We can use the NOT function to perform other logical operations with the combination of other Excel logical functions like IF, OR, etc.

Things to Remember about Logical Tests in Excel

  • Logical tests are used to return the values that depend on the condition’s satisfaction in Excel. Different logical tests follow different logic in Excel.
  • If the function returns one value if the condition is satisfied and returns another value if a condition is not satisfied, it returns values that the user provides.
  • OR function logic will return the value as True if any One condition is satisfied out of two conditions.
  • AND function logic will return the value as True if both conditions are satisfied. If any of the conditions is not satisfied, it will return a False value.
  • XOR Excel logical test will return a True value if only one condition satisfies out of two. It will return False if both are satisfied or not satisfied.
  • NOT function returns True if a condition is not satisfied and returns False if a condition is satisfied.
  • We can combine all these Logical tests in Excel depending on the situation and requirement.

Recommended Articles

This has been a guide to Logical Tests in Excel. Here we discuss using logical functions like IF, AND, OR, XOR, and NOT in Excel, along with practical examples and a downloadable template. You may learn more about Excel from the following articles –

  1. AND Function in Excel
  2. OR in Excel
  3. NOT in Excel
  4. SUMIF Function in Excel

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Logical Test Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download Logical Test Excel Template

EDUCBA

डाउनलोड Logical Test Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW