0% found this document useful (0 votes)
28 views6 pages

Excel Logic Functions Guide

Uploaded by

2019me102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views6 pages

Excel Logic Functions Guide

Uploaded by

2019me102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Shehryar Naeem

2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

Logical Functions in Excel:


 IF
 AND
 OR

IF Function:
It is the main logical function in
excel and is used very frequently. It basically
evaluates data on basis of a logical test; that if
a certain statement is valid then “this”
otherwise “not”. But its limitation is that it can
evaluate on basis of a single logical test at a
Mechanical Engineering

time if used in base form. Therefore it is


employed with other functions such as AND &
OR. In advanced form it can be used to perform
a certain operation if a certain condition/s is
fulfilled. Now we discuss the syntax of IF
function;
=IF(logical_test, [value_if_true], [value_if_false])
 Here, we can see that the first part contains
the condition to be fulfilled so that the
second part is the required value or the
third part is the output otherwise.

Page 1|6
Shehryar Naeem
2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

 It is also to be noted that the first part can


contain only one logical test at a time.
 IF function is not a case sensitive function
but the text should be an exact match.
Example:
=IF(B2=“Completed”, “No”, “Yes”)
A B C
1 Name Status Attention?
2 Project A Completed No
3 Project B Not Started Yes
4 Project C In Progress Yes

AND Function:
Mechanical Engineering

Based on the AND logic


gate this function can evaluate as TRUE or
FALSE on basis if multiple conditions are
satisfied. The function evaluation criteria is;
 TRUE if all the conditions are satisfied.
 FALSE if even anyone of the conditions is
not satisfied.
Thus, it can be used in areas where evaluation
on basis of multiple criteria is required i.e; in
collaboration with the IF function. Now we look
at its syntax;
Page 2|6
Shehryar Naeem
2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

=AND(logical1, [logical2]……)
 The syntax clearly explains that the logical
tests in this case are not restricted unlike
the IF function.
 The AND is seldom used alone. It is most
commonly used in combination with IF
function.
Example:
=AND(B2>=500,C2>=3)
A B C D
1 Name Spent Years Inc.
Discount
2 Matt $ 300 3 FALSE
Mechanical Engineering

3 Sharon $ 800 4 TRUE


4 Julie $ 400 1 FALSE

OR Function:
Based on the OR logic
gate this function can evaluate as TRUE or
FALSE on basis if even one of multiple
conditions is satisfied. The function evaluation
criteria is;
 FALSE if no the conditions is satisfied.

Page 3|6
Shehryar Naeem
2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

 TRUE if even anyone of the conditions is


satisfied.
Thus, it can be used in areas where evaluation
on basis of multiple criteria is required i.e; in
collaboration with the IF function. Now we look
at its syntax;
=OR(logical1, [logical2]……)
 The syntax clearly explains that the logical
tests in this case are not restricted unlike
the IF function.
 The OR is seldom used alone. It is most
commonly used in combination with IF
function.
Mechanical Engineering

Example:
=OR(B2>=500,C2>=3)

A B C D
1 Name Spent Years Inc.
Discount
2 Matt $ 300 3 TRUE
3 Sharon $ 800 4 TRUE
4 Julie $ 400 1 FALSE

Page 4|6
Shehryar Naeem
2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

Mechanical Engineering

Page 5|6
Shehryar Naeem
2019-ME-102
Logic Functions in Excel
Computing Fundamentals Lab

Mechanical Engineering

Page 6|6

You might also like