How to Improve Spreadsheet Integrity with VLOOKUP
by David Ringstrom on
Building complex spreadsheets without lookup formulas, such as VLOOKUP, is akin to putting a screw in the wall with a hammer. It’s possible, but the results aren’t pretty, and most probably won’t maintain integrity. The same can be said for spreadsheets where you manually reference individual cells over and over again, instead of letting Excel do the work for you.
Let’s say that you want to be able to look up addresses from a list based on a name. Users that are unaware of VLOOKUP often resort to manually copying and pasting the information, or creating simple formulas that point to the information. In the context of an invoice or other form, these “manual” lookups can become tedious. Instead, we can give Excel’s VLOOKUP function four pieces of information:
- Lookup value
- Table array
- Column index number
- Range lookup
I’ll explain each component individually:
- In this case the lookup value will be the name that we’ve typed in a given cell, such as cell A1 in Figure 1.
- The table array is the coordinates of our name/address list. One limitation of VLOOKUP is that our lookup value must appear within the first column of the table array.
- Column index number will typically be 2 or greater, and signifies the column position within our table array from which we want to return a piece of information. In this case my table array spans columns C through E. I’ll use the number 2 to signify that I want to return the street address from the second column of my table array.
- The range lookup argument can have significant impact on how our VLOOKUP works. I generally put the word FALSE in this position, which signifies that I want an exact match. If I were to use the word TRUE, then VLOOKUP would return data based on an approximate match. Situations, such as looking up an address, almost always require exact matches.
With this background in mind, let’s use VLOOKUP to return Ted’s street address. As shown in Figure 1, enter a name from your list in cell A1, such as Ted Smith, and then this formula in cell A2:
Figure 1: VLOOKUP can return data from a list based on criteria that you specify.
Using VLOOKUP’s vernacular, A1 is the lookup value, C1:E6 is the table array, 2 is the column index number, and FALSE signifies that we want an exact match. Once the formula is in place, type Jane Seyz in cell A1, and you should see the address change automatically.
The formula to return the City/State/Zip will be almost the same as the street address, meaning we’ll specify a column index number of 3 instead of 2. However, I’ll also demonstrate another of my VLOOKUP tricks, which is to use a zero in place of the word FALSE to signify an exact match:
Figure 2: You can use the number zero in place of the word FALSE to signify an
If you type a name that isn’t on the list, such as Vera Floyd, VLOOKUP will return #N/A. This signifies that the item you entered does not appear in column A of the list.
This article only scratches the surface of what’s possible with VLOOKUP. To learn many more ways to leverage lookup formulas, don’t miss the free High Impact Excel: VLOOKUP Edition webinar. Attendees of the live event can get one hour of free CPE credit. A recording will be made available afterwards for anyone that can’t attend the live webinar.
You may like these other stories...
Cybersecurity is no longer the domain of an organization's IT staff. It's moved to the boardroom, and in a big way. Accountants and financial managers may have been thinking it's just the province of the tech...
You probably don't want to think about how many times you access the File menu in Excel 2010 or 2013. Personally I think Excel 2010 has the best possible File menu arrangement, other than having Print Preview grafted...
Following other recent high-profile hacking events, investigators discovered yesterday that hackers broke into the draft work paper files of several famous CPA firms. Revealing images of the scantily clad documents have been...
Upcoming CPE Webinars
In this jam-packed presentation Excel expert David Ringstrom, CPA will give you a crash-course in creating spreadsheet-based dashboards. A dashboard condenses large amounts of data into a compact space, yet enables the end user to easily drill down into details when warranted.
This webcast will include discussions of important issues in SSARS No. 19 and the current status of proposed changes by the Accounting and Review Services Committee in these statements.
Kristen Rampe will share how to speak and write more effectively by understanding your own and your audience's communication style.
Amber Setter will show the value of leadership assessments as tools for individual and organizational leadership development initiatives.