Excel Compendium: Practical uses for Lookup and Reference functions

Excel's VLOOKUP, HLOOKUP, INDEX, and MATCH functions can make life a lot easier for accountants. This brief tutorial shows you how they work and outlines some situations where they can be applied.

An introduction to Lookup and Reference functions

Practical applications: Bring monthly budget figures into a financial report, or map values from different sources into a consolidated report.

Solutions: Use one of the Lookup and Reference category of functions to choose a value from a list or table

  • VLOOKUP() finds a value in a column and then returns the value of the cell in the same row as the matching value from a designated column (hence V for Vertical lookup)
  • HLOOKUP() finds a value in a row and then returns the value of the cell in the same column as the matching value from a designated row (hence H for Horizontal lookup)
  • INDEX() returns the value at the intersection of a particular row and column. The row and column are both designated as relative positions - ie Row 2, Column 3 would be second row down from the first cell in the range, third column right from the first cell in the range
  • MATCH() returns the relative position of an item in a list. MATCH() can be used with one of the other lookup formulas to find the column or row from which to return the value. Alternatively, MATCH() can be used with INDEX() to return an item at the intersection of a particular row and column without using either Lookup function.

Using the Lookup Wizard
The Lookup Wizard can be very useful in creating some of the more complex lookups - the INDEX() example in cell B21 below was created by the lookup wizard. To use the Lookup Wizard first make sure it is installed - go to Tools-Add-Ins and make sure 'Lookup Wizard' is ticked. Lookup should then appear as a sub option of the Wizard item at the bottom of the Tools menu. Excel 2007: Formulas ribbon-Solutions section-Lookup.

Different Excel Lookup techniques

VLOOKUP() to allocate nominal values to categories
The VLOOKUP() and HLOOKUP() functions use a fourth 'True/False' argument to determine whether the lookup should find the closest match or an exact match. To use the default 'True' for a closest match, the first column must be sorted in ascending order. If there is no exact match, lookup will find the next largest value that is less than the lookup value. So for example, C906 would find the value C000 in the first column being the largest 'number' that is less than C906. If you use the 'False' option then the first column does not need to be sorted and the lookup will return the first exact match it finds. If there is no match, the "#N/A error" will be returned:

Applying a

In our example we have created a table of account code ranges with matching categories. So account codes A000 to AZZZ will be categorised as sales, B000 to BZZZ as cost of sales etc.

Use MATCH() for more flexible reference arguments
Although VLOOKUP() and HLOOKUP() just have two options for this argument, the related MATCH() function is more flexible and has 3 possible match types:

  • 1 - finds the largest value that is less than or equal to the lookup value (as for the lookups above), the list must be in ascending order
  • 0 - finds the exact match, no order required
  • -1 - finds the smallest value that is greater than or equal to the lookup value, the list must be in descending order.

You may like these other stories...

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...
For bitcoin users, the taxman cometh. And you best know how to calculate taxes owed on what the IRS calls convertible virtual currency.In March 2014, the IRS issued Notice 2014-21, which declares virtual currency will be...

Already a member? log in here.

Upcoming CPE Webinars

Sep 24
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.
Sep 30
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.
Oct 23
Amber Setter will show the value of leadership assessments as tools for individual and organizational leadership development initiatives.
Oct 30
Many Excel users have a love-hate relationship with workbook links. For the uninitiated, workbook links allow you to connect one Microsoft Excel spreadsheet to other spreadsheets, Word documents, databases, and even web pages.