Chapter.04
-
Upload
program-in-interdisciplinary-computing -
Category
Education
-
view
7.235 -
download
1
description
Transcript of Chapter.04
![Page 1: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/1.jpg)
Applying Logic in Decision Making
Chapter 4
![Page 2: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/2.jpg)
Chapter Introduction
• Tools that allow comparison of data as well as analysis of sets of data using multiple criteria
• Boolean logical values (TRUE and FALSE)• Boolean logical functions (AND, OR, and NOT)• Specifying different cell formats based on
whether a set of criteria is met• Application of different outcomes to results of
logical tests that are TRUE versus those that are FALSE
Succeeding in Business with Microsoft Excel 2010 2
![Page 3: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/3.jpg)
Chapter Introduction (continued)
• Functions covered in this chapter: AND, IF, NOT, OR
To go to Level 1, click hereTo go to Level 2, click hereTo go to Level 3, click here
Succeeding in Business with Microsoft Excel 2010 3
![Page 4: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/4.jpg)
Functions Covered in this Chapter
• AND• IF• NOT• OR
Succeeding in Business with Microsoft Excel 2010 4
![Page 5: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/5.jpg)
Level 1 Objectives:Analyzing Data Using Relational Operators & Boolean Logical
Functions
• Understand the Boolean logical values TRUE and FALSE
• Build formulas with relational operators• Evaluate criteria using the Boolean logical
functions AND, OR, and NOT• Apply conditional formatting to highlight key
information in a worksheet
Succeeding in Business with Microsoft Excel 2010 5
![Page 6: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/6.jpg)
Reviewing Financial Criteria Related to Credit
• Dun & Bradstreet® (D&B)– Widely used financial reporting services– Provides financial information about corporations
and institutions and extensive analyses on each company’s creditworthiness and payment history (PAYDEX® index)
• Create formulas by applying several credit approval indicator rules to each customer’s data
Succeeding in Business with Microsoft Excel 2010 6Level 1 home
![Page 7: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/7.jpg)
Sample Worksheet
Succeeding in Business with Microsoft Excel 2010 7Level 1 home
D&B data includes credit rating class, PAYDEX score, and stress risk class.
![Page 8: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/8.jpg)
Using Relational Operators to Compare Two Values
• To determine if the relational expression is TRUE or FALSE
• Can be used to compare– Two values– Text labels– Dates
Succeeding in Business with Microsoft Excel 2010 8Level 1 home
![Page 9: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/9.jpg)
Using Relational Operators
Succeeding in Business with Microsoft Excel 2010 9Level 1 home
![Page 10: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/10.jpg)
Using Relational Operators
Succeeding in Business with Microsoft Excel 2010 10Level 1 home
![Page 11: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/11.jpg)
Using Boolean Logical Functions to Evaluate a List of Values and Determine a Single True or False Value
AND Used to determine if all arguments are TRUE
OR Used to determine if either argument is TRUE
NOT Evaluates only one logical argument to determine if it is FALSE
Succeeding in Business with Microsoft Excel 2010 11Level 1 home
![Page 12: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/12.jpg)
Outcomes for the AND Function Using Two Inputs
Succeeding in Business with Microsoft Excel 2010 12Level 1 home
![Page 13: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/13.jpg)
Outcomes for the OR Function Using Two Inputs
Succeeding in Business with Microsoft Excel 2010 13Level 1 home
![Page 14: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/14.jpg)
Outcomes of the NOT Function (Single Input)
Succeeding in Business with Microsoft Excel 2010 14Level 1 home
![Page 15: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/15.jpg)
Using the OR Functionto Evaluate Criteria
• OR (logical1,logical2,….)• Returns a value of TRUE if either criteria is met• Returns a value of FALSE only if all arguments
in the function are FALSE
Succeeding in Business with Microsoft Excel 2010 15Level 1 home
![Page 16: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/16.jpg)
Using the OR Function
Succeeding in Business with Microsoft Excel 2010 16Level 1 home
![Page 17: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/17.jpg)
Using the AND Functionto Evaluate Criteria
• AND (logical1,logical2,…)• Returns a value of TRUE only if all arguments
in the function are TRUE
Succeeding in Business with Microsoft Excel 2010 17Level 1 home
![Page 18: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/18.jpg)
Using the AND Function
Succeeding in Business with Microsoft Excel 2010 18Level 1 home
![Page 19: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/19.jpg)
Using the AND Function
Succeeding in Business with Microsoft Excel 2010 19Level 1 home
![Page 20: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/20.jpg)
Using the NOT Functionto Evaluate Criteria
• NOT (logical1)• Takes only one argument and changes a single
TRUE value to FALSE or vice versa– NOT(TRUE) returns the value of FALSE– NOT(FALSE) returns the value of TRUE
Succeeding in Business with Microsoft Excel 2010 20Level 1 home
![Page 21: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/21.jpg)
Using the NOT Function
Succeeding in Business with Microsoft Excel 2010 21Level 1 home
![Page 22: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/22.jpg)
Applying Conditional Formatting to a Worksheet
• Identifies a set of conditions and specifies formatting of a cell if those conditions are met
• Criteria can be specified based on:– Value in the cell being formatted– Results of a specified formula that returns a
Boolean value
Succeeding in Business with Microsoft Excel 2010 22Level 1 home
![Page 23: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/23.jpg)
Applying Conditional Formatting Based on Cell Value
• Select cell or cell range to be formatted• Click Conditional Formatting button arrow in
Styles group on Home tab• Select Data Bars, Color Scales, or Icon Sets
from the menu to open a gallery of options• Point to a format to preview it in the selected
cells, and click the desired format to apply it
Succeeding in Business with Microsoft Excel 2010 23Level 1 home
![Page 24: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/24.jpg)
Applying Conditional Formatting Based on Cell Value
Succeeding in Business with Microsoft Excel 2010 24Level 1 home
![Page 25: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/25.jpg)
Conditional FormattingBased on Cell Value
Succeeding in Business with Microsoft Excel 2010 25Level 1 home
![Page 26: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/26.jpg)
Conditional FormattingBased on Cell Value
Succeeding in Business with Microsoft Excel 2010 26
![Page 27: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/27.jpg)
Conditional FormattingBased on Cell Value
Succeeding in Business with Microsoft Excel 2010 27Level 1 home
![Page 28: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/28.jpg)
Applying Conditional Formatting Based on the Results of a Formula
• Highlight a single row as the range• Specify two separate conditions based on two
different formulas
Succeeding in Business with Microsoft Excel 2010 28Level 1 home
![Page 29: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/29.jpg)
Conditional Formatting Based on the Results of a Formula
Succeeding in Business with Microsoft Excel 2010 29Level 1 home
![Page 30: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/30.jpg)
Conditional Formatting Based on the Results of a Formula
Succeeding in Business with Microsoft Excel 2010 30Level 1 home
![Page 31: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/31.jpg)
Level 1 Summary
• Tools that allow you to evaluate and compare both text and numeric data– Relational operators (>,<,>=, <=, =, <>)– Boolean logical functions (AND, OR, and NOT)
• Both relational operators and Boolean functions return a Boolean logical value, TRUE or FALSE
• Using the Conditional Formatting tool
Succeeding in Business with Microsoft Excel 2010 31
![Page 32: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/32.jpg)
Level 2 Objectives:Analyzing Data Using IF Functions and Nested
Functions
• Understand how to build formulas with nested functions
• Write IF functions to evaluate TRUE/FALSE values and perform calculations
• Nest functions within an IF statement• Construct a simple nested IF function
Succeeding in Business with Microsoft Excel 2010 32
![Page 33: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/33.jpg)
Introduction to IF Functions and Nested Functions
• IF function– Boolean logical function that returns different values (TRUE or
FALSE) depending on how the specified condition evaluates– =IF(logical_test,value_if_true,value_if_false)
• Nested function (permitted by IF function)– Contains additional formulas and/or functions as one or more
of its arguments• Provides flexibility of choosing between two different sets
of criteria, and up to seven different levels of logical tests
Succeeding in Business with Microsoft Excel 2010 33Level 2 home
![Page 34: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/34.jpg)
Writing an IF Function with a Logical Test That Evaluates TRUE/FALSE Values
Succeeding in Business with Microsoft Excel 2010 34Level 2 home
![Page 35: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/35.jpg)
Writing an IF Function with a Logical Test That Performs a Simple Calculation
Succeeding in Business with Microsoft Excel 2010 35Level 2 home
![Page 36: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/36.jpg)
Writing an IF Function with a Logical Test That Performs a Simple Calculation
Succeeding in Business with Microsoft Excel 2010 36Level 2 home
![Page 37: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/37.jpg)
Writing IF Functionswith Nested Functions
Succeeding in Business with Microsoft Excel 2010 37Level 2 home
![Page 38: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/38.jpg)
Constructinga Simple Nested IF Function
Succeeding in Business with Microsoft Excel 2010 38Level 2 home
Nesting IF functions, one inside the other, allows you to ask a question, then another question depending on the outcome of the first question, and so on
![Page 39: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/39.jpg)
Constructinga Simple Nested IF Function
Succeeding in Business with Microsoft Excel 2010 39Level 2 home
![Page 40: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/40.jpg)
Constructinga Simple Nested IF Function
• An IF function can be used to evaluate a logical test.
• However, if the logical test results in a FALSE value, another calculation is needed.
Succeeding in Business with Microsoft Excel 2010 40Level 2 home
![Page 41: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/41.jpg)
Constructinga Simple Nested IF Function
Succeeding in Business with Microsoft Excel 2010 41Level 2 home
![Page 42: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/42.jpg)
Order of Logical Tests
• Must match established criteria for non-mutually exclusive criteria
• Can be placed in any order for mutually exclusive criteria
• Using a specific order can save considerable amount of work for criteria between a range of values
Succeeding in Business with Microsoft Excel 2010 42Level 2 home
![Page 43: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/43.jpg)
Order of Logical Tests
• Order of logical tests for non-mutually exclusive criteria
• Order of logical tests for mutually exclusive criteria
• Order of logical tests for criteria between a range of values
Succeeding in Business with Microsoft Excel 2010 43Level 2 home
![Page 44: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/44.jpg)
Level 2 Summary
• Applying Boolean logic within an IF statement• IF function allows you to determine if an
expression is TRUE or FALSE, and to return a value other than TRUE or FALSE (e.g., text or numeric values)
• Additional IF statements and other Excel functions can be nested within an IF function
Succeeding in Business with Microsoft Excel 2010 44
![Page 45: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/45.jpg)
Level 3 Objectives:Creating Complex Logical Constructs for Solving
Problems
• Combine sets of criteria in an IF function• Create a none of construct to perform a logical
test• Create an only construct to perform a logical
test• Solve more complex problems using nested IFs
and Boolean logical functions
Succeeding in Business with Microsoft Excel 2010 45
![Page 46: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/46.jpg)
Evaluating More Complex Criteria
• Techniques to create more complex logical constructs (combinations of multiple logical operations) to determine if none of the criteria are TRUE for a list of items, even if only certain criteria are TRUE for a list of items
• By nesting levels of IF functions, multiple sets of criteria can be sequentially analyzed until a final value is returned
Succeeding in Business with Microsoft Excel 2010 46Level 3 home
![Page 47: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/47.jpg)
Using an IF Function to Combine Sets of Criteria
• Reject• Further Evaluate• Accept
Succeeding in Business with Microsoft Excel 2010 47Level 3 home
![Page 48: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/48.jpg)
Using an IF Function to Combine Sets of Criteria
Succeeding in Business with Microsoft Excel 2010 48Level 3 home
![Page 49: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/49.jpg)
Using an IF Function to Combine Sets of Criteria
Succeeding in Business with Microsoft Excel 2010 49Level 3 home
![Page 50: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/50.jpg)
Using the None Of Construct
• Evaluates if none of the rules are met• Combines two steps into one by nesting the
formula• Example: =NOT(OR(K3:K21))
Succeeding in Business with Microsoft Excel 2010 50Level 3 home
![Page 51: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/51.jpg)
Using the None Of Construct
Succeeding in Business with Microsoft Excel 2010 51Level 3 home
![Page 52: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/52.jpg)
Using the Only Construct
• Determines if only Rule #1 evaluates to TRUE, and, if so, to recommend further evaluation; OR if only Rule #2 and/or Rule #3 evaluates to TRUE and not Rule #1
• Always has a positive condition to be evaluated AND a negative condition to be evaluated– An OR function is required for either the positive
condition or the negative condition if more than one item being evaluated falls in that category
Succeeding in Business with Microsoft Excel 2010 52Level 3 home
![Page 53: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/53.jpg)
Using the Only Construct
Succeeding in Business with Microsoft Excel 2010 53Level 3 home
![Page 54: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/54.jpg)
Using the Only Construct
Succeeding in Business with Microsoft Excel 2010 54Level 3 home
![Page 55: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/55.jpg)
Nesting Boolean Logical Operators to Analyze Criteria
Succeeding in Business with Microsoft Excel 2010 55Level 3 home
Evaluate all parts of the Further Evaluate criteria
![Page 56: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/56.jpg)
Completing the ComplexNested IF Formula
Succeeding in Business with Microsoft Excel 2010 56Level 3 home
![Page 57: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/57.jpg)
Completing the ComplexNested IF Formula
Succeeding in Business with Microsoft Excel 2010 57Level 3 home
![Page 58: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/58.jpg)
Level 3 Summary
• More complex logical constructs– “None of” construct– “Only” construct
• Combining constructs to solve more complex logical tasks, nesting IF functions, relational operators, and Boolean functions within the same formula
Succeeding in Business with Microsoft Excel 2010 58
![Page 59: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/59.jpg)
Chapter Summary
• Relational operators (>, <, >=, <=, =, <>) and the Boolean logical functions AND, OR, and NOT allow you to evaluate and compare both text and numeric data.
• Applying Boolean logic with an IF statement– TRUE/FALSE
• Complex logical constructs– None of– Only
Succeeding in Business with Microsoft Excel 2010 59
![Page 60: Chapter.04](https://reader035.fdocuments.in/reader035/viewer/2022070302/548643ccb4af9fd13e8b4642/html5/thumbnails/60.jpg)
Chapter Summary
Succeeding in Business with Microsoft Excel 2010 60