← 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

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. Every formula here is confirmed by actually executing it.