Submitted by: Craig Brody, Microsoft Office Training/Consulting/Programming Instructor, C. Brody Associates

The last two articles covered how to create a single Pivot Table and helpful quick tips creating Excel Pivot Tables for your sales reports and more.

Have you ever had to order something on the internet and when you selected an item to purchase, a related description for that item automatically appeared? That’s the idea behind Excel’s powerful VLOOKUP function.

Suppose you sell products offering quantity discounts.  With the VLookup function, you can automatically lookup the correct discount based on the amount ordered.

You set up a table to enter customer names and their purchase amounts in columns A and B.  Leave Column C blank for now, as this will be where the discount amounts are looked up based on the order amount in Column B.  Column D contains a formula that takes the customer order amount in Column B less the soon to be looked up discount amount in Column C.   So at this point, Column D would show zeros since the discount amount is not yet “looked up”.

You then setup a separate discount table.  Enter two columns; the first column contains values representing a top of the amount range for getting a discount.  The second column will hold the specific discount for that range.  So you may have in the first row of this table $1000 with a corresponding discount of $100, the second row shows $5,000 with a discount of $500 while the third row might show $10,000 with a corresponding discount of $1,500.  Therefore, any total amount ordered between $1,000 and $4,999 will get a $100 discount applied, any amount ordered between $5,000 and $9,999 will get a discount rate of $500 and any amount of 10,000 or more would mean a discount of $1,500.

Back in the first table, you move into Column C and enter a VLOOKUP function to look up the discount for the order amount in Column B.  Once the lookup function is entered and the correct discount amount appears, the total amount due (amount less discount) would appear in Column D.  Copying the formula down Column C would lookup discounts for other line item amounts.  So a VLOOKUP function in column C might look like:

=VLOOKUP(B2,$H$2:$I$4,2)

where cell B2 represents the customer order amount, range H2:I4 is the discount lookup table consisting of order amount levels and corresponding discount rates for those amounts, while the “2” in the formula indicates to lookup the discount in the second column of the table.  Once an approximate match is made between the customer order amount in cell B2 and one of the order amounts listed in the first column of the discount lookup table, the function looks into the second column of the lookup table of that “match” row and returns the correct discount amount.

There are more details concerning this important function and it may be helpful to see it applied in the context of a spreadsheet example.  Please contact the author if you would like to receive a sample illustrating this important formula.  Good luck using Excel’s VLookup function!

===================================

Brody Associates
Microsoft Office Training/Consulting/Programming
cell: 267-872-7410
email: cbrody@outlook.com
web: www.cbrodyassociates.com
linkedin: https://www.linkedin.com/in/craigbrody