← All how-to recipes

How to VLOOKUP to the left (return a value from a column before the match)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Look up a value and return something from a column to the LEFT of it — which plain VLOOKUP can't do.

The formula

AppFormulaNotes
Excel=INDEX(A2:A6,MATCH("Bob",B2:B6,0))INDEX/MATCH ignores column order. Or =XLOOKUP("Bob",B2:B6,A2:A6).
Google Sheets=INDEX(A2:A6,MATCH("Bob",B2:B6,0))Identical; XLOOKUP also works.
LibreOffice Calc=INDEX(A2:A6,MATCH("Bob",B2:B6,0))Identical.

How it works

MATCH finds the position of the lookup value in the key column; INDEX returns the value at that same position from any other column — including one to the left. MATCH("Bob",B2:B4,0) is 2, so INDEX(A2:A4, 2) returns X2. XLOOKUP does the same natively.

Verified, not just documented

We ran =INDEX(A2:A4,MATCH("Bob",B2:B4,0)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned X2 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned X2 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run Excel.

Functions used

INDEX · MATCH — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons