• Excel Book Excerpt

Excel Use VLOOKUP to Join Two Tables

This page is an advertiser-supported excerpt of the book, Learn Excel 2007-2010 from MrExcel - 512 Excel Mysteries Solved. If you like this topic, please consider buying the entire e-book.

Use VLOOKUP to Join Two Tables

Problem: My I.T. department gave me a data set with Item Number, Date, and Quantity sold. They didn’t put an item description in there. If I call back and ask them to re-do the file, it will take 3 weeks. Can I quickly fill in the item descriptions?

LE10000417.jpg

Figure 420 You need item description here.

I have a second table that maps item number to item description.

LE10000418.jpg

Figure 421 You have a table with the description for each item.

Strategy: Use VLOOKUP. This is the single most important function in Excel. VLOOKUP will save you time and time again.

In this situation, VLOOKUP requires four arguments:

  • The value to look up. In this case, it is cell A2.
  • A table with the lookup value in column 1 of the table. You always want to enter the table with dollar signs throughout the reference. That way, you can copy the VLOOKUP formula to other rows. In this case, the table is in $L$3:$M$30.
  • A column number in the table to return. Unlike Lotus 1-2-3, Excel will allow you to return the key column in the table, so the SKU column above would be column #1. The Description column is column 2.
  • The fourth argument in VLOOKUP is always FALSE. If you don’t put a FALSE as the fourth argument, Excel will give you results that almost match. This is NEVER what you want when you are solving these types of problems.

The formula for D2 is =VLOOKUP(A2,$L$3:$M$30,2,FALSE).

LE10000419.jpg

Figure 422 If you can enter the VLOOKUP with your eyes closed, I will give you a spot on my team when Excel becomes a sport in the Olympics.

Additional Details: I used to be a manager of financial analysis. On the job posting form when I was hiring financial analysts, I would list a single requirement: “Can do VLOOKUPs in your sleep". It really is the single most important Excel skill.

Additional Details: To me, the world breaks down into two kinds of people, those who can do VLOOKUPs, and everyone else.

<-Previous Topic Next Topic->

For more resources for Microsoft Excel: