Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Removing Borders

Converting to Octal

Filtering Columns for Unique Values

Printing Multiple Worksheets on a Single Page

Changing the Default Font

Creating a Drawing Object

Determining a Value of a Cell

 

Using VLOOKUP to Access Information to the Left

Summary: One of the most useful function in Excel is VLOOKUP. One thing it won't do, however, is allow you to lookup information to the left of the index column. This tip examines a couple of ways you can get around this limitation by using other worksheet functions. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

Titi asked if there is a way to use a negative index number with the VLOOKUP function so that info can be accessed to the left of the lookup column. If a negative index number is used with VLOOKUP, then Excel returns an error value (#VALUE) instead of looking up the information you want.

Obviously, a since VLOOKUP can only use positive index values, one solution is to reorganize your data so that it all appears to the right of your index column. Such an approach may not be feasible for many people, however. (The layout of the worksheet may be "cast in stone" by your company, for instance.)

There are a couple of ways you can approach this problem—ways that do not involve the use of VLOOKUP at all. The first is to simply use the LOOKUP function. Assuming that the value you want to look up is in cell A1, the range in which you want to find it is in the range G12:G145, and the "to the left stuff" is in F12:F145, you could use this formula:

=LOOKUP(A1,G12:G145,F12:F145)

This approach works just fine, provided that you are working with data in the lookup range (G12:G145) that is sorted. If your data is not sorted, then you should skip this approach and instead use the section approach, involving a combination of INDEX and MATCH. Assuming your data is in the exact same ranges, you could use this:

=INDEX(F12:F145,MATCH(A1,G12:G145,0))

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7001) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007

Organize Your Data! Using the powerful sorting capabilities of Excel can help you get your data into just the order you need. Find out how you can use the full capabilities of sorting to your benefit.
 
Check out ExcelTips: Serioius Sorting today!