[go: up one dir, main page]

0% found this document useful (0 votes)
5 views16 pages

Lect 5 Logical Functions1

The document explains logical (boolean) values, which can be either TRUE or FALSE, and provides examples of each. It introduces logical operators used in Excel, such as greater than and equal to, and discusses the IF function, which evaluates conditions to return different values based on TRUE or FALSE outcomes. Additionally, it covers the OR and AND functions, detailing how they determine the truth value based on multiple conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Lect 5 Logical Functions1

The document explains logical (boolean) values, which can be either TRUE or FALSE, and provides examples of each. It introduces logical operators used in Excel, such as greater than and equal to, and discusses the IF function, which evaluates conditions to return different values based on TRUE or FALSE outcomes. Additionally, it covers the OR and AND functions, detailing how they determine the truth value based on multiple conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Working with Functions

Logical Functions
Logical (AKA boolean) values

2
TRUE and FALSE
• A logical value can be one of only two values

TRUE

or

FALSE

3
TRUE
• The following statements are TRUE:

Fish live in water.


Deer live on land.

• The following statements are also TRUE:

3 is greater than 2
2 is less than 3
2 is less than or equal to 3
2 is less than or equal to 2
3 is greater than or equal to 2
3 is greater than or equal to 3
2 is equal to 2
2 is not equal to 3
4
FALSE
• The following statements are FALSE:

Fish live on land.


Deer live in water.

• The following statements are also FALSE:

2 is greater than 3
3 is less than 2
3 is less than or equal to 2
2 is greater than or equal to 3
2 is equal to 3
2 is not equal to 2
5
Logical operators
• In Excel the following "operators" are used
Operator Meaning
> greater than
< less than
>= greater than or equal to
<= less than or equal to
= equal to
<> not equal to
• Examples
3>2 true
3<2 false
6
If Function
• The IF function checks whether a condition is met, and returns
one value if TRUE and another value if FALSE.

The IF function returns Correct because the value in cell A1 is higher


than 10.
Exercise
Calculation of Result
Result
Calculating Commission
Final Result
AND & OR FUNCTION
Or Function
• The OR function returns TRUE if any of the conditions are
TRUE and returns FALSE if all conditions are false.

The OR function returns TRUE because the value in cell A1 is higher than 10.
As a result the IF function returns Correct.
And Function
• The AND Function returns TRUE if all conditions are true
and returns FALSE if any of the conditions are false.

The AND function returns FALSE because the value in cell B2 is


not higher than 5. As a result the IF function returns Incorrect.

You might also like