Contact

LOOKUP Function in Google Sheets: Syntax, Examples & Compatibility

Lookup Intermediate Google Sheets

Learn how to find an approximate match in a sorted key column and return a corresponding category in Google Sheets. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: find an approximate match in a sorted key column and return a corresponding category in Google Sheets. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.

Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Google Sheets test results. A guide being published here does not certify every software release or file-import scenario.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official LOOKUP reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and arguments

=LOOKUP(search_key, search_range_or_search_result_array, [result_range])

The keys must be sorted. With a single-row or single-column search range and separate result range, an exact key selects the aligned result; otherwise Google specifies the immediately smaller key. The numeric examples use unique ascending thresholds, so this is the largest eligible threshold, not a claim about which duplicate record wins.

The two-argument array form searches the first row when the range is wider than tall. A square or taller range is searched down its first column. It returns from the last row or column, respectively. The separate result range is not supplied for that combined-array form.

Best use case: Find an approximate match in a sorted key column and return a corresponding category.

Set up the example sheet

Enter the following small table, sorted by the minimum score:

Row A: threshold B: grade
2 0 Low
3 50 Medium
4 80 High
5 95 Elite

Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.

Worked example 1: LOOKUP with known input

=LOOKUP(72,A2:A5,B2:B5)

Expected output: Medium.

72 lies between the sorted thresholds 50 and 80, so the category associated with 50 is returned.

Worked example 2: a second LOOKUP case

=LOOKUP(98,A2:A5,B2:B5)

Expected output: Elite.

The highest threshold not exceeding 98 is 95.

Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.

Check the threshold boundaries

Keep the original A2:B5 threshold table. These controls expose the interval policy:

Search key Expected label
0 Low
49 Low
50 Medium
79 Medium
80 High
94 High
95 Elite
98 Elite

For example, =LOOKUP(79,A2:A5,B2:B5) returns Medium, even though 80 is numerically much closer to 79 than 50 is. This is a lower-threshold lookup, not a nearest-distance calculation.

The dedicated page does not establish every below-minimum, duplicate-key or mixed-type error result. Those are outside this unique-key table rather than borrowed from Excel.

Advanced example: combine the search and result ranges

The original A2:B5 range has four rows and two columns. The two-argument form:

=LOOKUP(72,A2:B5)

returns Medium, searching the first column and returning the last column.

In D2:G2 enter 0,50,80,95. In D3:G3 enter Low,Medium,High,Elite. The range is now two rows by four columns:

=LOOKUP(72,D2:G3)

Expected result: Medium again, this time searching the first row and returning the last row. A tall shape and a wide shape can express the same threshold policy.

For a square two-by-two range J2:K3 with rows 0,Low and 50,Medium, =LOOKUP(45,J2:K3) returns Low. Google’s explicit square-range rule searches the first column. Do not assume that a square shape is interpreted horizontally.

Advanced example: sorted keys still need aligned labels

In a separate copy, retain keys 0,50,80,95 but reverse only the labels to Elite,High,Medium,Low. A lookup for 72 now returns High under the same positional rule.

That result is mathematically consistent with the altered table but wrong for the original grading policy. Sort and move whole records together. Sorting keys alone cannot preserve the relationship with their categories.

If the task is to find an exact key rather than assign a threshold band, use a function with an explicit exact-match mode and test absent keys separately. Approximate lookup can return a plausible label when the requested key never occurs.

Practical advice and troubleshooting

When this formula helps: When you need an exact match on an unsorted key column, use XLOOKUP or INDEX/MATCH configured for exact matching.

Important edge case: This is an approximate sorted lookup: unsorted thresholds can return a plausible but wrong answer.

If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. For an imported file, check that the formula is being evaluated in Google Sheets and that its ranges and text survived conversion.

Compatibility and version considerations

Do not assume optional result arrays or missing-value handling work identically when migrating LOOKUP formulas.

Google Sheets is a rolling web service. Confirm the sheet locale and the full result area when checking an imported formula.

Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.

Editorial verification: Full dedicated reference and current manuscript reviewed October 14, 2026. Original and added outputs were independently calculated; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.