Excel Intermediate Logical Functions
INTERMEDIATE Logical Functions
Learn to build conditional formulas using IF AND and OR for practical worksheet decisions.
Logical Functions Overview
Logical functions test conditions and return results according to whether those conditions are met.
This topic covers IF AND and OR.
IF
Tests a condition and returns one result when the condition is true and another result when it is false.
AND
Checks whether all specified conditions are true.
OR
Checks whether at least one specified condition is true.
Essential Terms
Review the terms used when building logical formulas in Excel.
IF Function
IF evaluates a logical test and returns different results for true and false outcomes.
Using IF
Use IF when a worksheet result depends on whether a condition is met.
Syntax
=IF(logical_test,value_if_true,value_if_false)
The logical test is evaluated first and Excel then returns the appropriate result.
Example
=IF(B2>=50,"Pass","Fail")
Returns Pass when B2 is at least fifty and Fail otherwise.
AND Function
AND is useful when every specified condition must be satisfied.
Syntax
=AND(logical1,logical2)
Returns TRUE only when all supplied logical tests are true.
With IF
=IF(AND(B2>=50,C2>=50),"Pass","Fail")
Returns Pass only when both conditions are satisfied.
OR Function
OR is useful when satisfying any one of several conditions is sufficient.
Interactive Function Explorer
Review IF AND and OR and see how each function handles worksheet conditions.
Key Takeaways
Remember the purpose of each logical function before attempting the knowledge check.
Tests a condition and returns one result for true and another result for false.
Returns TRUE only when all specified conditions are true.
Returns TRUE when at least one specified condition is true.
AND and OR can be used inside IF when a decision depends on more than one condition.
Knowledge Check
Test your understanding of IF AND and OR.