You are on page 1of 10

Logical tests

If we want to compare the numbers with the help of operators we can do by


using logical tests.
By comparing the numbers, we will get answer in Boolean form (True or False)
That formulas are useful when we use IF, AND, OR, NOT functions

If Logical Function:
If function can put one of two things in a cell. “If Function” has three parts:

• Logical Test
• Value if True
• Value if False

For the “value if true” or “value if false” we can put numbers, Text(Must be in
double quotes), formulas, or cell ranges.

1
• We have two numbers 25 and 45 given below. If we compare them
through logical operators we will get answer either true or false

• But if we want to get answer in “1,0” we use logical operator inside the IF
Function. Formula is shown in figure below:

2
• If I want to get answer in “Pass,Fail”

Note:

In previous formula we didn’t use double quotes the reason is if we want to


display the answer in numbers it should be without double quotes but if we
want to display answer in Text form double quotes are mandatory.

• If I want the answer in capital “PASS” and capital “FAIL” we use “UPPER
TEXT FUNCTION”

3
• If we want the answer in “yes or no”

4
• Till now we were using the text, numbers and Boolean expressions
What if we want the answer of addition of two different cells(If the
answer is correct it will show the addition of two cells otherwise it will
display 0 )

• Now bit more advance in this,If the condition is satisfy we want today’s
date and if not we want 10 days from today’s date

5
Go to home> select drop down> select short date

6
Nested If Logical Function:
Nested IF functions, meaning one IF function inside of another, allow us to test
multiple criteria and increases the number of possible outcomes.

AND Function:
Use the AND function, one of the logical functions, to determine if all
conditions in a test are TRUE. The AND Function in excel is a logical
function that tests multiple conditions and returns “true” or “false”
depending on whether they are met or not. The formula of AND function
is “=AND(logical1,[logical2]…),” where “logical1” is the first condition to
evaluate.

In Figure below if both conditions are true than true will display in the
cell

7
Not Functions:
The NOT Function is an Excel Logical function. The function helps check if one
value is not equal to another. If we give TRUE, it will return FALSE and when
given FALSE, it will return TRUE. So, basically, it will always return a reverse
logical value.

8
OR Functions:
The OR function returns TRUE if any of its arguments evaluate to TRUE, and returns
FALSE if all of its arguments evaluate to FALSE.

9
10

You might also like