0% found this document useful (0 votes)
2 views19 pages

Logical Functions

Logical functions in spreadsheets are used to evaluate conditions and return TRUE or FALSE, aiding in decision-making. Key functions include IF, AND, OR, NOT, and IFS, each serving specific purposes for testing conditions. The document outlines the syntax and examples for using these functions effectively in spreadsheet calculations.
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)
2 views19 pages

Logical Functions

Logical functions in spreadsheets are used to evaluate conditions and return TRUE or FALSE, aiding in decision-making. Key functions include IF, AND, OR, NOT, and IFS, each serving specific purposes for testing conditions. The document outlines the syntax and examples for using these functions effectively in spreadsheet calculations.
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/ 19

Logical functions

INTRODUCTION TO LOGICAL FUNCTIONS

• Logical functions are used in spreadsheets to test whether a situation is true


or false.
• These decisions can be used to display information, perform different
calculations, or to perform further tests.
• Logical functions provide decision-making tools for information in a spreadsheet.
• Return TRUE or FALSE.- Common functions: AND, OR, NOT, IF, IFS.
AND FUNCTION

• •

• The IF function is the key logical function used for decision making.
• It takes the format: =IF(condition, true, false)
• Purpose:
• Returns a value based on a condition.
• Syntax:
• =IF(logical_test, value_if_true, value_if_false)
• Example:
• =IF(A1 > 10, 'Yes', 'No') returns 'Yes' if A1 > 10, otherwise 'No'.
OR FUNCTION

• The OR function is also used to compare more than one condition. It


returns TRUE if any of the conditions are met, and takes the format:
=OR(condition1, condition2,…)
• For example, =OR(B2 > 400, C2 < 300) where,B2 > 40
• Purpose
• Checks if any condition is TRUE.
• Syntax:
• =OR(logical1, [logical2], ...)
• Example:
• =OR(A1 > 10, B1 < 5) returns TRUE if A1 > 10 or B1 < 5
NOT FUNCTION

• Sometimes the best way to get the result you need is to exclude the values
that you don’t want, rather than testing for the values that you do. The NOT
function is perfect for this situation, returning the logical opposite of the
condition test
• Purpose: Reverses the logical value.
• Syntax: =NOT(logical)
• Example: =NOT(A1 > 10) returns TRUE if A1 is not greater than 10.
• Daily Use: Exclude specific items, e.g., NOT marking 'Completed' tasks
IF WITH AND

• Excel syntax: IF(AND(condition 1, condition 2), “value_if_true”, “val


• Excel Formula =IF(AND(B3>100,C3>1000),”YES”,”NO”)

• If both condition 1 and condition 2 evaluates to TRUE, then the value that
function returns is “YES”.
• If any of the conditions or every condition evaluates to FALSE, then the value that
function returns is “NO”.
If with OR

• To evaluate two or more conditions and return one result if any of the conditions
is TRUE, and another result if all the conditions are FALSE, embed the OR
function in the logical test of IF:
• IF(OR(condition1, condition2,...), value_if_true, value_if_false)
AND OR function

• To check various combinations of multiple conditions, you


are free to combine the IF, AND, OR and other functions to
run the required logical tests.
In the Excel language, our conditions are expressed in this
way:
OR(AND(Customer1, Amount>100), AND(Customer2,
Amount>100)
Nested IF

• Nested IF is a function that contains many IF statements inside an IF function. We


can also say it as the function starts with If function and other IF functions are
included inside the original IF function.
• formula: =IF(logical_test,[value_if_true],[value_if_false],IF(logical_test,
[value_if_true],[value_if_false], …))
IFS Function

• IFS is a function which contains one or more arguments


inside a function. The user uses IFS statements to
evaluate multiple conditions without using many if
statements. It is much simpler to read and it results in
the value corresponding to the first true statement.
• Syntax
• IFS(Logical_Test1, value_if_true1, [Logical_Test2,
value_if_true2], [Logical_Test3, value_if_true3],…)
conclusion

You might also like