0% found this document useful (0 votes)
20 views

Excel Functions 2

Logical functions in Excel allow for decision-making in formulas by evaluating conditions and returning true or false. Common logical functions include IF, AND, OR, and NOT. Nested IF functions allow evaluating multiple conditions. Other functions covered include VLOOKUP to look up values based on serial numbers.

Uploaded by

chavanroshan43
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Excel Functions 2

Logical functions in Excel allow for decision-making in formulas by evaluating conditions and returning true or false. Common logical functions include IF, AND, OR, and NOT. Nested IF functions allow evaluating multiple conditions. Other functions covered include VLOOKUP to look up values based on serial numbers.

Uploaded by

chavanroshan43
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

IF, AND, OR, Nested IF & NOT Logical Functions in Excel

• Things will not always be the way we want them to be. The
unexpected can happen. For example, let’s say you have to divide
numbers. Trying to divide any number by zero (0) gives an error.
Logical functions come in handy such cases. In this tutorial, we are
going to cover the following topics.
• What is a Logical Function?
• It is a feature that allows us to introduce decision-making when
executing formulas and functions. Functions are used to;
• Check if a condition is true or false
• Combine multiple conditions together
What is a condition and why does it matter?

• A condition is an expression that either evaluates to true or false.


The expression could be a function that determines if the value
entered in a cell is of numeric or text data type, if a value is
greater than, equal to or less than a specified value, etc.
IF Function example
• We will work with the home supplies budget from this tutorial.
We will use the IF function to determine if an item is expensive or
not. We will assume that items with a value greater than 6,000
are expensive. Those that are less than 6,000 are less expensive.
The following image shows us the dataset that we will work with.
•Put the cursor focus in cell F4
•Enter the following formula that uses the IF function

•=IF(E4<6000,”Yes”,”No”)
• “=IF(…)” calls the IF functions
• “E4<6000” is the condition that the IF function evaluates. It
checks the value of cell address E4 (subtotal) is less than 6,000
• “Yes” this is the value that the function will display if the value
of E4 is less than 6,000
• “No” this is the value that the function will display if the value
of E4 is greater than 6,000

When you are done press the enter key


You will get the following results
Excel Logic functions explained
S/N FUNCTION CATEGORY DESCRIPTION USAGE

Checks multiple conditions and returns


=AND(1 > 0,ISNUMBER(1)) The above function
01 AND Logical true if they all the conditions evaluate to
returns TRUE because both Condition is True.
true.

Returns the logical value FALSE. It is used


02 FALSE Logical to compare the results of a condition or FALSE()
function that either returns true or false

Verifies whether a condition is met or not.


If the condition is met, it returns true. If
=IF(ISNUMBER(22),”Yes”, “No”)
03 IF Logical the condition is not met, it returns false.
22 is Number so that it return Yes.
=IF(logical_test,[value_if_true],[value_if_f
alse])
Returns the expression value if no error occurs. If =IFERROR(5/0,”Divide by zero
04 IFERROR Logical
an error occurs, it returns the error value error”)

=IFNA(D6*E6,0)
Returns value if #N/A error does not occur. If #N/A
N.B the above formula returns zero
05 IFNA Logical error occurs, it returns NA value. #N/A error means
if both or either D6 or E6 is/are
a value if not available to a formula or function.
empty
=NOT(ISTEXT(0))
N.B. the above function returns
Returns true if the condition is false and returns
06 NOT Logical true. This is because ISTEXT(0)
false if condition is true
returns false and NOT function
converts false to TRUE
=OR(D8=”admin”,E8=”cashier”)
Used when evaluating multiple conditions. Returns
N.B. the above function returns
07 OR Logical true if any or all of the conditions are true. Returns
true if either or both D8 and E8
false if all of the conditions are false
admin or cashier

Returns the logical value TRUE. It is used to


08 TRUE Logical compare the results of a condition or function that TRUE()
either returns true or false
Nested IF functions

• A nested IF function is an IF function within another IF function.


Nested if statements come in handy when we have to work with more
than two conditions. Let’s say we want to develop a simple program
that checks the day of the week. If the day is Saturday we want to
display “party well”, if it’s Sunday we want to display “time to rest”,
and if it’s any day from Monday to Friday we want to display,
remember to complete your to do list.
• A nested if function can help us to implement the above example. The
following flowchart shows how the nested IF function will be
implemented.
The formula for the above flowchart is as follows
=IF(B1=”Sunday”,”time to rest”,IF(B1=”Saturday”,”party well”,”to do list”))

• “=IF(….)” is the main if function


• “=IF(…,IF(….))” the second IF function is the nested one. It provides
further evaluation if the main IF function returned false.
VLOOKUP Functions
The VLOOKUP function is used to perform a vertical look up
in the left most column and return a value in the same row
from a column that you specify. Let’s explain this in a
layman’s language. The home supplies budget has a serial
number column that uniquely identifies each item in the
budget. Suppose you have the item serial number, and you
would like to know the item description, you can use the
VLOOKUP function. Here is how the VLOOKUP function
would work
=VLOOKUP (C12, A4:B8, 2, FALSE)
Here is a list of important Excel Formula and Function

•SUM function = =SUM(E4:E8)


•MIN function = =MIN(E4:E8)
•MAX function = =MAX(E4:E8)
•AVERAGE function = =AVERAGE(E4:E8)
•COUNT function = =COUNT(E4:E8)
•DAYS function = =DAYS(D4,C4)
•VLOOKUP function = =VLOOKUP (C12, A4:B8, 2, FALSE)
•DATE function = =DATE(2020,2,4)

You might also like