Presentation is loading. Please wait.

Presentation is loading. Please wait.

Table Lookup and Error Handling

Similar presentations


Presentation on theme: "Table Lookup and Error Handling"— Presentation transcript:

1 Table Lookup and Error Handling
Topic 5 Lesson 4 - Lookup Example

2 Learning Objectives Upon completion of this lesson, you will be able to: recognize the limitations of VLOOKUP apply the INDEX function in combination with the MATCH function in an example work through an example

3 The Situation You have conducted a survey using an online survey tool.
Your questions included "Agreement Scale" ("Likert Scale") question like this one: The amount of material in this course is appropriate. Respondents are required to choose an agreement level from these categories: Strongly Disagree Disagree Neutral Agree Strongly Agree

4 Evaluation of the Survey
Imagine that you are trying to evaluate the survey results and you would like to determine the "average" response to the question. Let's say that you got these six responses: Agree Strongly Agree Strongly Disagree Neutral

5 STOP THE VIDEO NOW... How you would solve this (very real!) problem?
Load the Excel file and play around with some strategies. Only return to the video once you're convinced that you can't solve this -- you should spend at least 30 minutes trying to figure this out!

6 Strategy How would you "average" text responses… well, you can't.
So, instead how about this: convert each response to an equivalent number, e.g., Strongly Disagree = 1, Disagree = 2, and so on using a table lookup calculate the average based on the numeric score use a table lookup to find up the closest category to the numeric score, e.g., let's say the average comes out to 3.6 then you'd say the average was "Agree" as 3.6 is rounded up to 4 and 4 corresponds to "Agree" in our scale

7 STOP THE VIDEO NOW... Can you solve this now?
Load the Excel file and play around with some strategies. Only return to the video once you're convinced that you can't solve this -- you should spend at least 30 minutes trying to figure this out!

8 Limitations of VLOOKUP
While VLOOKUP (and HLOOKUP) is the most commonly used search function in Excel, it has its limitations: the data must be sorted for approximate (interval) lookups to work as it performs a binary search the lookup value can only be in the first column of the lookup table The more powerful search function is INDEX used in conjunction with MATCH.

9 Guarding Against Errors
Just in case there's an issue finding a value (shouldn't be an issue in this case, but you never know)... Use IFERROR around VLOOOKUP in case VLOOKUP can't find the value in the table and it returns a #N/A error.

10 STOP THE VIDEO NOW... Fix the formula for VLOOKUP so that it uses IFERROR Test it out by deliberately misspelling one of the answers and see if it behaves as expected What should IFERROR return in such a case? Only return to the video once you're convinced that you can't solve this -- you should spend at least 30 minutes trying to figure this out!

11 Common Errors VLOOKUP returns a #N/A error:
#N/A means that lookup can't find what you are looking for. This could be because 1) your lookup value is incorrect 2) your lookup value is not in the table because you set up the table incorrectly 3) you mispelled the key values when you entered them into the lookup table 4) you have an extra space after the value in the table 5) your named range does not include all of the columns in the lookup table

12 Summary If you need to only lookup based on the first column of the lookup table, then VLOOKUP will work. If you need the ability to look up based on a key that's not in the first column, then INDEX-MATCH is required.

13 Questions?


Download ppt "Table Lookup and Error Handling"

Similar presentations


Ads by Google