FormulaCraft

How to do a case-sensitive lookup in Excel and Google Sheets

Topic:Lookups (any direction)
Excel & Google Sheets
=INDEX(B2:B5,MATCH(TRUE,EXACT(A2:A5,D2),0))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In Excel, enter the formula =INDEX(B2:B5,MATCH(TRUE,EXACT(A2:A5,D2),0)) and confirm with Ctrl+Shift+Enter to make it an array formula.
  2. 2In Google Sheets, enter the same formula and press Enter normally — it handles arrays automatically.
  3. 3EXACT compares each lookup column value to D2 with case sensitivity, returning TRUE only for an exact case match.
  4. 4MATCH finds the first TRUE, and INDEX returns the corresponding value.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why does VLOOKUP not distinguish case?

VLOOKUP uses a case-insensitive comparison internally. 'apple', 'Apple', and 'APPLE' are all treated as the same string.

How does EXACT differ from a normal equals comparison?

EXACT(a,b) returns TRUE only when the text and its case match exactly. The = operator in formulas is case-insensitive.

More on Lookups (any direction)

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: