Contact

LOOKUP Function in Microsoft Excel: Syntax, Examples & Compatibility

Lookup Intermediate Microsoft Excel

Learn how to find an approximate match in a sorted key column and return a corresponding category in Microsoft Excel. 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: Excel LOOKUP performs an approximate search over ascending keys. It uses the largest key less than or equal to the requested value and returns an aligned result. It is not an exact-match-only lookup.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official LOOKUP reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Vector syntax and sorted-data requirement

=LOOKUP(lookup_value,lookup_vector,[result_vector])

The lookup vector is one row or one column, sorted in ascending order. If supplied, the result vector must have the same size and preserve positional alignment. Microsoft documents case-insensitive text comparison, but the numeric examples below avoid a mixed-type sorting policy.

When no exact key exists, LOOKUP uses the largest key no greater than the request. If the request is below the smallest key, the documented error is #N/A. The source does not establish a universal duplicate-key tie selection here; all primary thresholds are unique.

Set up the original example sheet

Enter the original fixture, with thresholds sorted ascending:

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

Place result formulas outside this table. Examples use English names and comma separators; adapt separators for the workbook locale. Expected outputs are independently calculated, not native Excel captures.

Worked example 1: preserve the original intermediate lookup

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

Expected output: Medium. The largest threshold not exceeding 72 is 50. The result comes from the same position in B2:B5, rather than the numerically closest threshold.

Worked example 2: preserve the original high lookup

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

Expected output: Elite. The highest threshold not exceeding 98 is 95. A value above the final threshold continues to use that last threshold’s category.

Example 3: test each boundary

Request Expected category
-1 #N/A
0 Low
49.99 Low
50 Medium
79.99 Medium
80 High
94.99 High
95 Elite
200 Elite

The lower boundary of each category is inclusive. The formula does not enforce a maximum valid score. If scores above 100 are invalid for the application, validate that domain separately; LOOKUP’s Elite answer alone is not proof of valid input.

Advanced example: approximate does not mean nearest distance

For request 79, the largest eligible threshold is 50, so the category is Medium. Threshold 80 is only one unit away, but exceeds the request and is not selected.

This behavior is appropriate for lower-bound bands. If the intended task is the nearest measurement or an exact identifier, this function’s matching rule answers a different question.

Use an explicitly exact mode in XLOOKUP or MATCH when exact identity is required, within those functions’ own platform and version scope.

Advanced example: preserve the alignment while sorting

Keep A and B together when changing the threshold order. A correctly sorted key vector paired with an independently reordered category vector can return a plausible but wrong label.

For a separate fixture in D2:E4, use keys 0,100,200 with respective labels Basic,Standard,Extended. Request 150 selects the second position and returns Standard. If the labels are reordered to Extended,Basic,Standard without moving their keys, the same search would return Basic instead.

This example isolates a data-alignment failure. LOOKUP cannot infer that a category has been moved to the wrong row.

Advanced example: array form chooses its search direction by shape

Excel also documents a two-argument array form:

=LOOKUP(lookup_value,array)

In a range wider than it is tall, it searches the first row and returns from the last row. In a square or taller range, it searches the first column and returns from the last column.

For a separate three-row, two-column G2:H4 range, enter thresholds 0,50,80 in G and labels Low,Medium,High in H. =LOOKUP(72,G2:H4) has expected result Medium.

For a two-row, three-column J2:L3 range, put 0,50,80 across J2:L2 and Low,Medium,High across J3:L3. =LOOKUP(72,J2:L3) also has expected result Medium, this time from a horizontal search.

These numeric-key controls establish the orientation difference without relying on an unsorted or ambiguous array. Microsoft describes this array form as a compatibility feature and recommends VLOOKUP or HLOOKUP instead; it is still documented, not described as a retired function.

Defaults, duplicate keys and errors left open

The vector result argument is optional, but the dedicated prose does not give a complete omitted-result example or every conversion rule. These worked vector formulas supply it explicitly. Do not infer an omitted-output or duplicate-key result from a different product’s implementation.

Unsorted keys can produce incorrect answers rather than an obvious error. Mixed logical/text/numeric sorting, source errors and exact errors for mismatched result dimensions are not certified here. Check the intended input group, order, alignment and domain before using a fallback label.

Editorial verification: Full manuscript and dedicated Microsoft function body reviewed on October 14, 2026. Original title, date, two worked formulas and input fixtures are preserved, alongside the exact approved lifecycle section. All stated original and added outputs were independently modeled; no native Excel execution, performance benchmark or workbook interchange certification was performed. Unsupported edge cases remain explicit.