Looking Up a Customer Account Number
The discount schedule lookup table in the previous section is an example of a range lookup where you check to see if the lookup value falls within a range of values, such as 1–5 or 6–25. However, you often come across situations in which you need to match specific values instead of ranges.
For example, you might need to look up an employee ID, a part code, or a book’s ISBN number. These are examples of discrete value lookups where your formula needs to match some value exactly.
A tab le of customer names and account numbers is a good example of a lookup table that contains discrete lookup values. In this case, you want to use the VLOOKUP() function (or, less likely, the HLOOKUP() function) to find an exact match for a customer name you specify, and then return the corresponding account number. Figure 5.4 shows a simple data-entry screen that automatically adds a customer account number in column E after the user selects the customer name from a drop-down list in column D.
An example of a function that accomplishes this is in cell E3:
=VLOOKUP(D3, A2:B93, 2, FALSE)
The value in D3 is looked up in list of customer names in column A, and because the range_lookup argument is set to FALSE, VLOOKUP() searches for an exact match. If it finds one, it returns the corresponding account number from column B.
// Related Posted - GOOGLE!
Related Websites
- Customer Data Segmentation -- Why and How I'm doing a little research into US based data rental and segmentation services. Four services that look to have good...
- Use this HSA Calculator to Predict the Future Value of Your Health Savings Account This post is for those of us of who are now or who will be covered under a high deductibe...
- Wallpaper Tips for Installation There are a lot of reasons to choose wallpaper over paint for the walls in your home. Wallpaper can add...
- Currency Exchange & Other Tricks to Save More Money Currency exchange is a thrifty tool in my home. To save money, my 11-year-old daughter has swapped five single dollars...
- Scouting for Ski Hills: Tips and Tricks If you're new to the sport of skiing, it goes without saying that you'll want to find the right ski...

