Lookups

How to Look Up a Value to the Left in Excel

How to look up a value to the left in Excel when VLOOKUP can't do it, with INDEX and MATCH, XLOOKUP, a column move and a CHOOSE workaround.

On this page
  1. Why VLOOKUP cannot look left
  2. Option 1: INDEX with MATCH
  3. Option 2: XLOOKUP
  4. Option 3: Move the column
  5. Option 4: a VLOOKUP with CHOOSE
  6. Which one to use

VLOOKUP only returns values from columns to the right of its first column. If the value you want sits to the left of the column you are matching on, VLOOKUP cannot reach it. There are several ways around that.

Take a simple example. Employee IDs are in column B and names are in column A. In D2 you type an ID, and you want the name in E2.

Why VLOOKUP cannot look left

The first column of the table argument is always the column VLOOKUP searches. If that range starts at column B, the names in column A are outside the range, so there is no way to return them. You could set the range to start at column A, but then VLOOKUP would search the names instead of the IDs.

Option 1: INDEX with MATCH

This works in every version of Excel:

=INDEX(A2:A20, MATCH(D2, B2:B20, 0))

MATCH finds where the ID in D2 sits within B2:B20. If it is in the fifth row, MATCH returns 5. INDEX then returns the fifth value from A2:A20, which is the name. The 0 at the end asks for an exact match. The two functions are explained in how to use index and match in excel.

Option 2: XLOOKUP

If you have Excel 2021 or Microsoft 365, XLOOKUP does the job in one function:

=XLOOKUP(D2, B2:B20, A2:A20)

The lookup range and the return range can be on either side of each other, and there is no column number to count. how to use xlookup in excel covers the other arguments.

Option 3: Move the column

If nothing depends on the current layout, you can move the names column to the left of the IDs, and then a normal VLOOKUP will work. Before you do this, check whether other formulas, charts or pivot tables use those columns. Moving them can change what they show.

Option 4: a VLOOKUP with CHOOSE

This formula builds a two-column range with the IDs first, so VLOOKUP can read it:

=VLOOKUP(D2, CHOOSE({1,2}, B2:B20, A2:A20), 2, FALSE)

It works, but it is harder to read than the others. Older versions of Excel may need the formula confirmed with Ctrl+Shift+Enter instead of Enter.

Which one to use

If you have Excel 2021 or Microsoft 365, XLOOKUP is the easiest to read. If you need the formula to work in older versions, INDEX with MATCH is the safe choice. Moving the column is fine for a one-off sheet where the layout does not matter.

When you copy any of these formulas down a column, lock the ranges with dollar signs so they do not shift. how to lock cell reference in excel explains how to do this.

The complete guide to lookups

How to Look Up Data in Excel
Read the guide

Keep exploring

Guides from other topics

All topics →