You are on page 1of 11

From Free Document Downloads at TheSmallBusinessOwnersManual.

com

VLOOKUP: Article Text for Business Edge, March 2006
By Joe Kennedy, TheSmallBusinessOwnersManual.com

VLOOKUP and its sister function HLOOKUP are the closest Excel comes to a database lookup, which is often desir spreadsheets need to refer to tables of changing information. VLOOKUP returns cell data from tables arranged verti example below), while HLOOKUP returns cell data from tables arranged in a horizontal fashion.

The good news is that this function can save huge amounts of time in repetitive and error-prone tasks. But watch ou easy to spot and values can change without warning.

The purpose of this article is to introduce the function and stimulate thinking about where it can be applied. I encour study this article and experiment carefully before using it for production purposes.

VLOOKUP is at its best when you must refer to table values that sometimes change. Examples might include a tabl employee pay rates, or a product price chart. Our article is limited to a simple example since this is an introductory d to best demonstrate the range, not depth of the function.

Let’s get right to an example with a company that sells the items seen on the feb.pricetable tab in the sample spreads tsbom.com/docdownloads/docs/BusinessEdgeExcelVLookupArticle.xls.

Manual lookup of these prices every time an estimate, purchase order, invoice or management report is prepared is a consuming and error prone activity. So once the feb.pricetable tab is entered we can employ VLOOKUP in other sp such as invoice60201, invoice60202, etc to return the information we need.

Let’s say that a customer orders 11 TS118300’s and 14 TS118400’s. Rather than type-in all of the information need we can use VLOOKUP to help. The format for VLOOKUP is: VLOOKUP(Value, Table, Column Number, Exact match True or False) Where:

Value – is a reference to a row where we want Excel to lookup and return additional information. In this cas Model Number to lookup the Description and Sell Price in other parts of the row.

Table – is simply the table where the data resides. It is important to note that the “Value” (above) must be in the Table and nowhere else. Further be sure the Table is sorted in ascending order or unexpected results ma table above, Column A is sorted in ascending order and Excel respects this even though we are using string v

Column Number – tells Excel which column number to return as the result. For example, when we want the ask for the fourth Column, or Column D.

we need the Sell Price for this same model number.feb. value in Column 2.feb.pricetable!$A$3:$D$7. . In our example. So the formulas in row 11 change to: =VLOOKUP(A11. The most likely cause of problems would be if the new prices for March are entered on top of February Table values.TRUE). In the invoice tabs (such as invoice60201) cell B10 is the item description. This is the same as the previous formula. Other difficult to predict problems may occur if the index column – colum table – is not entered in ascending order. but then everything else is automatic.feb. except n value from Column 4. row 11 of the invoice60201 tab. So of th this simple invoice.4.pricetable!$A$3:$D$7. You can see that these formulas are now easy to copy and adjust and we are getting some real utility in this simple ex But caution is needed. simply won’t do. go to the price Table. Again. which VLOOKUP provides when we formula =VLOOKUP(A10.TRUE) and =VLOOKUP(A11. which is the Description for a model TS118300 – a “300GB SCSI DRIVE. not Column 2. These functi provide faster results with fewer errors than manual lookup and entry of this same information. and to spawn new spreads month when the adjusted prices come out. We must still enter the Quantity of Units in Column D of the invoice.Exact Match True or False – This tells Excel if we demand an exact match to our lookup request.2.TRUE) This simply says to take the Model Number in cell A10. Perhaps the best way to avoid this problem is to lock and protect the feb. we will demand an exact match. or if otherw value is OK. all of the underlying invoices would be immediately and without warning repric rates. Avoid this problem by doing a Data > Sort of the table before using VLOO avoid allowing Excel to use an approximate match by always using the TRUE switch at the end of the formula.pricetable!$A$3:$D$7.2.feb. in both cases the TRUE switch is used since we can’t tolerate a close m exact.pricetable!$A$3:$D$7.” Moving right to cell C10.TRUE). In the next row. use VLOOKUP and HLOOKUP when reference to changing table values is needed. look up the row for Model TS118300.prices tab. we only need to enter the Model Number and Quantity. Of course nothing beats experimenting with VLOOKUP to see how it may be utilized with your particular situation s With these basics. The default value is False. and VLOOKUP returns the information w the formula =VLOOKUP(A10. we are selling Model TS118400. like most accounting work. so the VLOOKUP formulas are th we are now concerned with row 11 and not row 10. In this case. meaning that Excel will return a value even if no exact match is fou since this can cause problems.4.

com). joe@tsbom. an M marketing.com . and has worked with small businesses for over 20 years.Joe Kennedy is author of “The Small Business Owners Manual” (www. Email critique and comments are welcomed.tsbom. has a degree in finance.

xls .99 $234.From Free Document Downloads at TheSmallBusinessOwnersManual.00 Sell Price $119.99 This spreadsheet is available for download at http://tsbom.00 $250.99 $289. March 200 PRODUCT CATALOG AND PRICES FOR APRIL Model Number TS118200 TS118300 TS118400 TS118500 Description 200GB SCSI DRIVE 300GB SCSI DRIVE 400GB SCSI DRIVE 500GB SCSI DRIVE Cost $100.com/docdownloads/docs/BusinessEdgeExcelVLookupArticle.00 $200.99 $174.com This spreadsheet is for the example sited in the Excel Tips: VLOOKUP article for Business Edge magazine.00 $150.

March 2006. .usiness Edge magazine. by Joe Kennedy.

00 $200.450.00 14 $2.650.From Free Document Downloads at TheSmallBusinessOwnersManual.00 TOTAL DUE $4. March 200 INVOICE From: Date To: ABC DISK SALES May 26.00 Invoice Number 60201 UNITS MODEL NUMBER DESCRIPTION TS118300 TS118400 300GB SCSI DRIVE 400GB SCSI DRIVE EXTENDED PRICE 11 $1.com This spreadsheet is for the example sited in the Excel Tips: VLOOKUP article for Business Edge magazine. 2011 BIG DISK CUSTOMER SELL PRICE $150.800.com/docdownloads/docs/BusinessEdgeExcelVLookupArticle.00 This spreadsheet is available for download at http://tsbom.xls .

by Joe Kennedy .ness Edge magazine. March 2006.

00 $2.00 $250.com/docdownloads/docs/BusinessEdgeExcelVLookupArticle.000.xls .00 $6.com This spreadsheet is for the example sited in the Excel Tips: VLOOKUP article for Business Edge magazine.00 $150.800.From Free Document Downloads at TheSmallBusinessOwnersManual.00 $200. 2011 AMAZING COMPUTER COMPANY SELL PRICE $100. March 200 INVOICE From: Date To: ABC DISK SALES May 26.00 Invoice Number 60202 UNITS MODEL NUMBER DESCRIPTION TS118200 TS118300 TS118400 TS118500 200GB SCSI DRIVE 300GB SCSI DRIVE 400GB SCSI DRIVE 500GB SCSI DRIVE TOTAL DUE 5 14 9 8 EXTENDED PRICE $500.400.00 This spreadsheet is available for download at http://tsbom.00 $2.00 $1.100.

March 2006.ness Edge magazine. by Joe Kennedy .

com/docdownloads/docs/BusinessEdgeExcelVLookupArticle.050.00 This spreadsheet is available for download at http://tsbom.00 $250.00 TOTAL DUE $4.00 9 $1. March 200 INVOICE From: Date To: ABC DISK SALES May 26.00 $150. 2011 DULL COMPUTER.000. INC. SELL PRICE $100.com This spreadsheet is for the example sited in the Excel Tips: VLOOKUP article for Business Edge magazine.350.xls .00 Invoice Number 60203 UNITS MODEL NUMBER DESCRIPTION TS118200 TS118500 TS118300 200GB SCSI DRIVE 500GB SCSI DRIVE 300GB SCSI DRIVE EXTENDED PRICE 7 $700.00 8 $2.From Free Document Downloads at TheSmallBusinessOwnersManual.

March 2006. by Joe Kennedy .ness Edge magazine.