Case Sensitive VLOOKUP in Excel & Google Sheets

This tutorial will demonstrate how to perform a case-sensitive VLOOKUP in Excel using two different methods and Google Sheets using one method.

vlookup case sensitive Main Function

Case-Sensitive VLOOKUP with Helper Column

VLU-WH

VLOOKUP Function

The VLOOKUP Function is used to look up an approximate or exact match for a value in the leftmost column of a range and returns the corresponding value from another column. By default, VLOOKUP will only work for non-case-sensitive values like so:

P VLU

AutoMacro - VBA Code Generator

Case-Sensitive VLOOKUP

By combining VLOOKUP, EXACT, MAX and ROW, we can create a case-sensitive VLOOKUP formula that returns the corresponding value for our case-sensitive VLOOKUP. Let’s walk through an example.

We have a list of items and their corresponding prices (notice that Item ID is case-sensitive unique):

VLU Table 01

Supposed we are asked to get the price for an item using its Item ID like so:

VLU Table 02

To accomplish this, we fist need to create a helper column using ROW:

VLU Table 03

=ROW() click and drag (or double-click) to prefill all rows in the range

Next, combine VLOOKUP, MAX, EXACT and ROW in a formula like so:

VLU-WH

How does the formula work?

  1. The EXACT function checks the Item ID in E2 (lookup value) against the values in B2:B7 (lookup range) and returns an array of TRUE where there is an exact match or FLASEs in an array {FLASE, FLASE, FLASE, FLASE, FLASE, TRUE}.
  2. This array is then multiplied by the ROW array {2, 3, 4, 5, 6, 7} (note that this matches our helper column).
  3. The MAX function returns the maximum value from the resulting array {0,0,0,0,0,7}, which is 7 in our example.
  4. Then we use the result as our lookup value in a VLOOKUP and choose our helper column as the lookup range. In our example, the formula returns the matching value of $16.00.

Method 2 – case-sensitive VLOOKUP with “virtual” helper column

VLU

This method uses the same logic as the first method, but eliminates the need for creating a helper column and instead uses CHOOSE and ROW to create a “virtual” helper column like so:

How does the formula work?

  1. The first part of the formula works the same way as the first method.
  2. Combining CHOOSE and ROW returns an array with two columns, one for the row number and another for the price. The array is separated by a semicolon to represent the next row and a comma for the next column like so: {2,45; 3,83; 4,23; 5,74; 6,4; 7,16}.
  3. We can then use the result from the first part of the formula in a VLOOKUP to find the corresponding value from our CHOOSE and ROW array.

Case Sensitive VLOOKUP in Google Sheets

To perform a case-sensitive VLOOKUP in Google Sheets, use this method:

vlookup case sensitive Google Function

Excel Practice Worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!