Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Do Reverse VLOOKUP in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Reverse VLOOKUP in Excel means looking up a value to the left of the key column. Standard VLOOKUP only searches the first column of a range and returns a value to the right, so to find a value that sits to the left you need a different formula. The most reliable approach is INDEX with MATCH: =INDEX(return_range, MATCH(lookup_value, lookup_range, 0)). This works in every Excel version and does not require the lookup column to be first. If you have a modern Excel version, XLOOKUP is simpler: =XLOOKUP(lookup_value, lookup_range, return_range). Either formula gives you a true reverse lookup without rearranging your data.

What You'll Need

  • Excel 2016 or later for INDEX/MATCH; Excel 365 or Excel 2021 for XLOOKUP.
  • A table where the value you want to return is in a column to the left of the column you are searching.
  • Consistent data types in the lookup column (no numbers stored as text mixed with real numbers).
  • Optional: a named range or Excel Table for cleaner formulas.

Step-by-Step

  1. Identify your columns. Suppose column B holds product names and column A holds product codes. You want to find the code (A) for a given name (B). The lookup column is B, the return column is A.
  2. Pick a cell for the result. Click an empty cell where the answer should appear, for example E2.
  3. Enter the INDEX/MATCH formula. Type =INDEX(A2:A100, MATCH("Widget", B2:B100, 0)). Replace "Widget" with a cell reference such as D2 if the search term is in a cell. The 0 at the end means exact match.
  4. Press Enter. The formula returns the value from column A that corresponds to the first exact match in column B.
  5. Use XLOOKUP if available. In Excel 365 or 2021, type =XLOOKUP(D2, B2:B100, A2:A100). The first argument is the lookup value, the second is the lookup column, the third is the return column. XLOOKUP defaults to exact match, so no fourth argument is needed.
  6. Lock the ranges. If you plan to copy the formula down, press F4 to make ranges absolute: =INDEX($A$2:$A$100, MATCH(D2, $B$2:$B$100, 0)). This prevents ranges from shifting.
  7. Copy the formula down. Drag the fill handle from the corner of the cell to apply the formula to other rows. Each row will look up its own search term if you used a relative cell reference like D2.
  8. Handle errors. Wrap the formula in IFERROR to show a blank or message instead of #N/A: =IFERROR(INDEX($A$2:$A$100, MATCH(D2, $B$2:$B$100, 0)), "Not found").

Note: Menu labels and function names can differ slightly by Excel version, device, or region. The formulas above work in desktop Excel for Windows and Mac; Excel for the web supports INDEX/MATCH and XLOOKUP in current versions.

Common Mistakes

  • Using VLOOKUP with a negative column index. VLOOKUP cannot look left; the third argument must be a positive number. Use INDEX/MATCH or XLOOKUP instead.
  • Forgetting the exact-match argument. Omitting the 0 in MATCH defaults to approximate match and can return wrong results on unsorted data.
  • Mismatched ranges. The MATCH range and INDEX range must have the same number of rows. If one starts at row 2 and the other at row 3, results shift by one row.
  • Numbers stored as text. A lookup value of 123 (number) will not match "123" (text). Use VALUE or TEXT to align types, or clean the data with Text to Columns.
  • Duplicate keys. MATCH returns the first match only. If duplicates exist, decide which one you want or use a helper column to make keys unique.
  • Trailing spaces. Extra spaces in the lookup column cause #N/A. Use TRIM on the lookup column or clean the source data.

Tips

  • Convert your range to an Excel Table (Ctrl+T).
  • Use XLOOKUP when possible: it handles reverse lookups natively, defaults to exact match, and can return a range of columns at once.
  • For a quick visual check, apply a filter to the lookup column and search for the value; if it appears more than once, note which row you need.
  • Name your ranges (Formulas > Define Name) to make formulas easier to read and audit.
  • If you need to look up based on multiple criteria, combine INDEX/MATCH with an array formula or use XLOOKUP with concatenated keys.

Troubleshooting

  • #N/A error: The lookup value is not found exactly. Check for extra spaces, case differences (MATCH is not case-sensitive, but text must match exactly otherwise), or numbers stored as text. Use TRIM and check cell formatting.
  • #REF! error: The INDEX range is invalid or the formula references deleted cells. Verify ranges still exist.
  • #VALUE! error: One of the arguments is the wrong type, for example a range where a single value is expected. Check that MATCH's second argument is a one-column or one-row range.
  • Wrong result returned: Likely an approximate match because the 0 was omitted, or duplicate keys. Add the 0 and verify uniqueness.
  • Formula works in one cell but not when copied: Relative references shifted. Use absolute references ($) for ranges.
  • XLOOKUP not available: Your Excel version is older than 365/2021. Use INDEX/MATCH instead; it is fully supported.

Frequently Asked Questions

Can VLOOKUP look to the left?

No. VLOOKUP always searches the first column of the range and returns a value to the right. Use INDEX/MATCH or XLOOKUP for leftward lookups.

What is the difference between INDEX/MATCH and XLOOKUP for reverse lookup?

Both work. XLOOKUP is shorter and defaults to exact match, but requires Excel 365 or 2021. INDEX/MATCH works in all modern Excel versions and is more universally compatible.

Why does my reverse lookup return #N/A when the value clearly exists?

Common causes are trailing spaces, numbers stored as text, or a non-exact match setting. Clean the data with TRIM and ensure the match type is 0.

Can I do a reverse lookup with multiple criteria?

Yes. Use INDEX/MATCH with an array formula (Ctrl+Shift+Enter in older Excel) or XLOOKUP with concatenated keys, for example =XLOOKUP(D2&E2, B2:B100&C2:C100, A2:A100).

Does reverse VLOOKUP work in Excel for the web?

Yes, both INDEX/MATCH and XLOOKUP are supported in current Excel for the web. Older browsers or versions may lack XLOOKUP; use INDEX/MATCH as a fallback.

How do I handle duplicate lookup values?

MATCH returns the first occurrence. If you need a specific duplicate, add a helper column that combines the key with a unique identifier, or use a formula that counts occurrences.