Chapter.05

Preview:

DESCRIPTION

 

Citation preview

Retrieving Data for Computation, Analysis, and Reference

Chapter 5

Chapter Introduction

• Reference and Lookup functions– Look up data based on its location in a table– Retrieve corresponding value that matches specified

criteria• Functions covered in this chapter: CHOOSE,

HLOOKUP, IFERROR, INDEX, ISBLANK, LOOKUP, MATCH, VLOOKUP

To go to Level 1, click hereTo go to Level 2, click hereTo go to Level 3, click hereSucceeding in Business with Microsoft Excel 2010 2

Functions Covered in this Chapter

• CHOOSE• HLOOKUP• IFERROR• INDEX• ISBLANK• LOOKUP• MATCH• VLOOKUP

Succeeding in Business with Microsoft Excel 2010 3

Level 1 Objectives:Performing Basic Lookups to Calculate and Evaluate

Data

• Organize and evaluate data in vertical and horizontal lookup tables

• Understand the VLOOKUP and HLOOKUP algorithms

• Retrieve data from a vertical lookup table• Retrieve data from a horizontal lookup table

Succeeding in Business with Microsoft Excel 2010 4

Working with Lookup Tables

• Contain data that can be used to create worksheets that list items, and then perform calculations

• Automate the process of looking up data to use in calculating unit and total prices

Succeeding in Business with Microsoft Excel 2010 5Level 1 home

Working with Lookup Tables

Succeeding in Business with Microsoft Excel 2010 6Level 1 home

Retrieving Data from a Vertical Lookup Table

• VLOOKUP function– Most effective and flexible way to retrieve data

organized in columns– Searches specified part of worksheet for data,

starting with the first column– =VLOOKUP(lookup_value,table_array,

col_index_num,range_lookup)– Must specify col_index_num

Succeeding in Business with Microsoft Excel 2010 7Level 1 home

VLOOKUP Function Arguments

Succeeding in Business with Microsoft Excel 2010 8Level 1 home

Results of Using the VLOOKUP Function

Succeeding in Business with Microsoft Excel 2010 9Level 1 home

Examining the VLOOKUP Algorithm

• Steps that Excel performs when VLOOKUP type is TRUE and key data is sorted in ascending order:1. Look for an exact match2. Check first value in lookup table3. Check next value in lookup table4. Check last value in lookup table

Succeeding in Business with Microsoft Excel 2010 10Level 1 home

Retrieving an Exact Match

• If using lookup type of FALSE, VLOOKUP function looks only for an exact match of the lookup value

• Values in lookup table need not need be sorted in ascending order

• VLOOKUP function displays #N/A in cell if exact match is not found

Succeeding in Business with Microsoft Excel 2010 11Level 1 home

VLOOKUP Function with a FALSE Lookup Type

Succeeding in Business with Microsoft Excel 2010 12Level 1 home

Retrieving Data from a Horizontal Lookup Table

• HLOOKUP function– Looks up a value by testing for a criterion across a

row– HLOOKUP(lookup_value,table_array,

row_index_num,range_lookup)– Must specify row_index_num

Succeeding in Business with Microsoft Excel 2010 13Level 1 home

HLOOKUP Function Arguments

Succeeding in Business with Microsoft Excel 2010 14Level 1 home

HLOOKUP Type TRUE Algorithm

• Works in same way as for VLOOKUP function, except that values are tested across the row (instead of down the first column)

• First row of lookup table must be sorted in ascending order

Succeeding in Business with Microsoft Excel 2010 15Level 1 home

Using HLOOKUP Function

Succeeding in Business with Microsoft Excel 2010 16Level 1 home

Level 1 Summary

• VLOOKUP function– Use when first column of lookup table contains the

key data, and information you want to retrieve is in a column to the right of key data column

• HLOOKUP function– Similar to VLOOKUP, except that it retrieves data

stored in horizontal lookup tables– Use when first row of lookup table contains the key

data, and the information you want to retrieve is in a row before the key data row

Succeeding in Business with Microsoft Excel 2010 17

Level 2 Objectives: Performing More Complex Lookups Involving Multiple

Worksheets & Multidimensional Tables

• Analyze and retrieve data from multiple worksheets

• Look up data in a one-row or one-column range

• Use named range references in formulas• Retrieve data from multidimensional tables

Succeeding in Business with Microsoft Excel 2010 18

Retrieving Data from Multiple Worksheets

• Use VLOOKUP and HLOOKUP formulas– This is especially useful when lookup tables are

long

Succeeding in Business with Microsoft Excel 2010 19Level 2 home

Retrieving Data from Multiple Worksheets

Succeeding in Business with Microsoft Excel 2010 20Level 2 home

Using VLOOKUP with Multiple Worksheets

Succeeding in Business with Microsoft Excel 2010 21Level 2 home

Retrieving Data from Multiple Worksheets

Succeeding in Business with Microsoft Excel 2010 22Level 2 home

Looking Up Data in a One-Row or One-Column Range

• Use LOOKUP function– Looks up the greatest value that does not exceed a

specified value anywhere in a table or range– Can retrieve data from a lookup table with a

vertical or horizontal orientation– Uses only a TRUE lookup type; column or row

containing lookup values must be in ascending order

– LOOKUP(lookup_value,lookup_vector,result vector)

Succeeding in Business with Microsoft Excel 2010 23Level 2 home

LOOKUP Function Arguments

Succeeding in Business with Microsoft Excel 2010 24Level 2 home

Using the LOOKUP Function

Succeeding in Business with Microsoft Excel 2010 25Level 2 home

Retrieving Data from Multidimensional Tables

• Use INDEX function with two- or three-dimensional tables– Returns the value in a table based on row and

column numbers that you specify– =INDEX(reference,row_num,column_num,

area_num)– Has several guidelines

Succeeding in Business with Microsoft Excel 2010 26Level 2 home

INDEX Function Arguments

Succeeding in Business with Microsoft Excel 2010 27Level 2 home

Using an INDEX Function with a Two-Dimensional Table

Succeeding in Business with Microsoft Excel 2010 28Level 2 home

Using an INDEX Function with a Three-Dimensional Table

Succeeding in Business with Microsoft Excel 2010 29Level 2 home

INDEX function guidelines

• Follow the guidelines on page 322 when using the INDEX function.

Succeeding in Business with Microsoft Excel 2010 30

Level 2 Summary

• LOOKUP function– Looks up the greatest value that does not exceed a

specified value anywhere in the table or range– Can retrieve data from a lookup table with a

vertical or horizontal orientation• INDEX function– Allows retrieval of data from multidimensional

tables

Succeeding in Business with Microsoft Excel 2010 31

Level 3 Objectives: Nesting Lookup & Reference Functions to Retrieve & Calculate Data

• Prevent errors in data retrieval• Nest lookup and reference functions to

perform more complex calculations• Choose a value or a range of values for

analysis• Retrieve data by matching the relative position

of an item in a list

Succeeding in Business with Microsoft Excel 2010 32

Refining the Order Form

Succeeding in Business with Microsoft Excel 2010 33Level 3 home

Using the ISBLANK Function

• ISBLANK functions– Nine functions that test a value or cell reference,

then return a TRUE or FALSE value depending on results

– Often used in formulas to test the outcome of a calculation

– When combined with IF function, help locate data-entry errors

– =ISBLANK(value)

Succeeding in Business with Microsoft Excel 2010 34Level 3 home

IS Functions

Succeeding in Business with Microsoft Excel 2010 35Level 3 home

Nesting Lookup Functions to Calculate the Price Per Unit

Succeeding in Business with Microsoft Excel 2010 36Level 3 home

Nesting VLOOKUP in an IF Function to Determine the lookup_value

Succeeding in Business with Microsoft Excel 2010 37Level 3 home

Using the CHOOSE Function to Determine the table _array

• A Reference and Lookup function that can return a value or a range for up to 254 different values

• =CHOOSE(index_num,value1,value2,…)

Succeeding in Business with Microsoft Excel 2010 38Level 3 home

Using the CHOOSE Function to Determine the table_array

Succeeding in Business with Microsoft Excel 2010 39Level 3 home

Determining the col_index_num

Succeeding in Business with Microsoft Excel 2010 40Level 3 home

Determining the range_lookup

Succeeding in Business with Microsoft Excel 2010 41Level 3 home

Creating the Nested VLOOKUP Formula

Succeeding in Business with Microsoft Excel 2010 42Level 3 home

Calculating Totals

Succeeding in Business with Microsoft Excel 2010 43Level 3 home

Calculating the Discount Amount

Succeeding in Business with Microsoft Excel 2010 44Level 3 home

Calculating the Shipping Costs Using MATCH and INDEX Functions

• INDEX function– =INDEX(reference,row_num,column_num,

area_num)• MATCH function– Designed to return relative position of an item in a

list– MATCH(lookup_value,lookup_array,

match_type)– Has several guidelines

Succeeding in Business with Microsoft Excel 2010 45Level 3 home

MATCH Function Arguments

Succeeding in Business with Microsoft Excel 2010 46Level 3 home

Using the INDEX Function

• Determine reference argument of INDEX function

• Determine row_num of INDEX function• Determine col_num of INDEX function by

using MATCH function• Determine area_num of INDEX function

Succeeding in Business with Microsoft Excel 2010 47Level 3 home

Creating the Complex INDEX Formula and Completing the Worksheet

Succeeding in Business with Microsoft Excel 2010 48Level 3 home

Creating the Complex INDEX Formula and Completing the Worksheet

Succeeding in Business with Microsoft Excel 2010 49Level 3 home

Level 3 Summary

• To solve more complex problems, nest Reference and Lookup functions using IF, IS, INDEX, CHOOSE, and MATCH functions

• ISBLANK– One of nine IS functions, which all check for a

condition, then return a TRUE or FALSE value– Checks whether a specified value refers to an

empty cell

Succeeding in Business with Microsoft Excel 2010 50

Level 3 Summary (continued)

• INDEX– Returns the value in a table based on specified

row and column numbers • CHOOSE– Returns a value/range for up to 29 corresponding

values• MATCH– Returns the relative position of an item in a list

Succeeding in Business with Microsoft Excel 2010 51

Chapter Summary

• Performing basic lookups to calculate and evaluate data

• Performing more complex lookups involving multiple worksheets and multidimensional tables

• Nesting lookup and reference functions to retrieve and calculate data

Succeeding in Business with Microsoft Excel 2010 52