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
- Tips For Advertising on the Google Local Business Center Any store owner or service provider doing business on a local level will want to advertise his business in the...
- Top 10 Ways To Lose All The Money In Your Trading Account In 30 Days Or Less - Guaranteed! Taz Trader Blog has a great article on how to lose money trading.#10 - Put all of your efforts into...
- Editing and Organizing WordPress Category Slugs In WordPress 2.7, when editing the categories or converting a category to a sub-category, the slugs will automatically replaced in...
- 100 Quick Tennis Tips pt 3 Here are 100 quick and easy tennis tips to get your game going. We're going to spread this list out...
- 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...

