Excel TVExcelTV

Every Excel LOOKUP Explained

Updated
Ultimate Excel lookup guide cover showing lookup functions

Excel has six common lookup options: LOOKUP, VLOOKUP, HLOOKUP, INDEX/MATCH, XLOOKUP, and XMATCH. For new work, start with XLOOKUP: =XLOOKUP(A2,CustomerIDs,CustomerNames,"Not found"). Use the older functions when you need compatibility, a specific approximate-match behavior, or an existing workbook already depends on them.

The downloadable guide is available early because it belongs with the decision, not at the end of the page: download the Ultimate Excel Lookup Guide PDF.

Excel Lookup Functions Compared

FunctionExampleMatch DirectionBest UseMain Limitation
XLOOKUP=XLOOKUP(A2,IDs,Names,"Not found")Any directionDefault choice for modern ExcelNot available in older perpetual versions
VLOOKUP=VLOOKUP(A2,$A$2:$D$100,3,FALSE)Down first column, return to the rightLegacy exact-match tablesBreaks when return-column positions change
HLOOKUP=HLOOKUP(A2,$B$1:$M$4,3,FALSE)Across top row, return belowWide tables with headers across columnsAwkward for most normalized data
INDEX/MATCH=INDEX(Names,MATCH(A2,IDs,0))Any directionOlder Excel with flexible lookup directionTwo-function syntax is harder to read
XMATCH=XMATCH(A2,IDs,0)Returns positionFind an item’s row or column numberNeeds INDEX or another function to return values
LOOKUP=LOOKUP(A2,Thresholds,Rates)Approximate in sorted vectorRate bands, grading scales, thresholdsRequires sorted ascending data

If your goal is to modernize formulas, read XLOOKUP vs VLOOKUP next. If you want a deeper XLOOKUP walkthrough, use the dedicated Excel XLOOKUP guide.

Which Lookup Function Should You Choose?

Choose by workbook age, lookup direction, and whether the match must be exact.

ScenarioBest FunctionWhy
New Microsoft 365 workbookXLOOKUPExact match by default, readable arguments, built-in not-found message
Workbook shared with older Excel usersVLOOKUP or INDEX/MATCHBetter compatibility
Need to return a value to the left of the lookup columnXLOOKUP or INDEX/MATCHVLOOKUP cannot look left without helper tricks
Need the position of a value, not the value itselfXMATCHReturns the relative index number
Rate table, commission bracket, tax band, or grade scaleXLOOKUP approximate match or LOOKUPApproximate match is the intent
Headers run across columns instead of down rowsHLOOKUP or XLOOKUPHLOOKUP matches the layout; XLOOKUP is usually cleaner

XLOOKUP

XLOOKUP is the best default lookup function in modern Excel because it separates the lookup range from the return range.

=XLOOKUP(A2,$A$2:$A$100,$D$2:$D$100,"Not found")

This searches for A2 in A2:A100 and returns the matching value from D2:D100. It does not care whether the return column is left or right of the lookup column.

Useful XLOOKUP arguments:

ArgumentExamplePurpose
if_not_found"Not found"Replaces a separate IFERROR wrapper
match_mode0Exact match
match_mode-1Exact match or next smaller item
match_mode1Exact match or next larger item
search_mode-1Search from bottom to top

For most business workbooks, this is the formula to teach first.

VLOOKUP

VLOOKUP searches the first column of a table and returns a value from a column to the right.

=VLOOKUP(A2,$A$2:$D$100,3,FALSE)

This searches for A2 in the first column of A2:D100 and returns the value from the third column of that table. The final FALSE requests an exact match.

Use VLOOKUP when the workbook must remain familiar to users who know older Excel. Avoid it when the return column might move, because hard-coded column numbers are a common source of errors. For performance and exact-vs-approximate details, see the advanced VLOOKUP tutorial.

HLOOKUP

HLOOKUP is the horizontal version of VLOOKUP.

=HLOOKUP(A2,$B$1:$M$4,3,FALSE)

It searches the top row of B1:M4 and returns a value from the third row of that range. Use it for wide tables where months, product codes, or scenario names run across the top.

In new workbooks, XLOOKUP is usually clearer:

=XLOOKUP(A2,$B$1:$M$1,$B$3:$M$3,"Not found")

INDEX and MATCH

INDEX/MATCH is still valuable when you need modern lookup behavior in a workbook that does not support XLOOKUP.

=INDEX($D$2:$D$100,MATCH(A2,$A$2:$A$100,0))

MATCH finds the relative row position of A2 in A2:A100. INDEX returns the value from that same position in D2:D100.

Use INDEX/MATCH when:

  • The return range is to the left of the lookup range.
  • The workbook must support older Excel versions.
  • Existing models already use INDEX/MATCH and consistency matters.

XMATCH

XMATCH returns a position rather than a value.

=XMATCH(A2,$A$2:$A$100,0)

That formula returns the relative position of A2 inside A2:A100. It is useful when you want to feed a row or column number into INDEX, build dynamic reports, or locate a matching header.

Combined with INDEX, it can replace older MATCH formulas:

=INDEX($D$2:$D$100,XMATCH(A2,$A$2:$A$100,0))

LOOKUP

The original LOOKUP function is best treated as a legacy approximate-match tool. It comes in vector and array forms, but the vector form is the one worth knowing.

=LOOKUP(A2,$F$2:$F$6,$G$2:$G$6)

This searches sorted thresholds in F2:F6 and returns the corresponding result from G2:G6. It finds the largest value less than or equal to the lookup value.

Use LOOKUP only when the lookup vector is sorted ascending. If the data is unsorted, use XLOOKUP exact match or INDEX/MATCH exact match instead.

Approximate Match Examples

Approximate match is not wrong; it is just specific. Use it for brackets and thresholds:

Score MinimumGrade
0F
60D
70C
80B
90A

For a score in A2, either of these formulas can return the grade:

=XLOOKUP(A2,$F$2:$F$6,$G$2:$G$6,,-1)
=LOOKUP(A2,$F$2:$F$6,$G$2:$G$6)

The table must be sorted from smallest threshold to largest. For more examples, see Excel Approximate Match.

Common Lookup Errors

Most lookup errors come from one of five causes:

SymptomLikely CauseFix
#N/ANo exact matchCheck spelling, spaces, and data type
Wrong resultApproximate match used on unsorted dataSort the lookup column or use exact match
#REF!Deleted return column or broken rangeRebuild the table range
Match looks present but failsNumber stored as text, or extra spacesUse VALUE, TRIM, or clean the source data
VLOOKUP breaks after inserting columnsHard-coded return column number changedUse XLOOKUP or INDEX/MATCH

When in doubt, test the lookup value with =COUNTIF(lookup_range,A2). If the count is zero, Excel is not seeing an exact match.

Frequently Asked Questions

How do you use LOOKUP in Excel?

Use =LOOKUP(lookup_value,lookup_vector,result_vector) with a sorted ascending lookup vector. It returns the result paired with the largest lookup value less than or equal to the search value.

How do you use VLOOKUP in Excel?

Use =VLOOKUP(lookup_value,table_array,col_index_num,FALSE) for an exact match. The lookup column must be the first column of the table array, and the return column must be to the right.

How do you use XLOOKUP in Excel?

Use =XLOOKUP(lookup_value,lookup_array,return_array,"Not found"). The lookup and return arrays can be separate ranges, so the return value can be left, right, above, or below the lookup value.

What is the difference between VLOOKUP, HLOOKUP, and XLOOKUP?

VLOOKUP searches vertically, HLOOKUP searches horizontally, and XLOOKUP can search either direction while also handling missing values and left-side returns more cleanly.

Can Excel do fuzzy lookup?

Excel formulas can do approximate numeric matching, but true fuzzy text matching is better handled with Power Query’s fuzzy merge or Microsoft’s Fuzzy Lookup add-in. Do not use approximate numeric match as a substitute for fuzzy text matching.

How do you look up data from another sheet?

Add the sheet name to the range references:

=XLOOKUP(A2,Sheet2!$A$2:$A$100,Sheet2!$C$2:$C$100,"Not found")

How do you return multiple values?

With XLOOKUP, point the return array at multiple columns:

=XLOOKUP(A2,$A$2:$A$100,$C$2:$E$100,"Not found")

This can spill the matching row’s return values across adjacent cells in dynamic-array Excel.

Written by

Allen Hoffman

Contributor, Excel TV

  • Lookup Functions
  • Data Manipulation
  • Keyboard Shortcuts
  • Workflow Efficiency
Allen Hoffman is a contributor to Excel TV focused on practical Excel techniques for everyday data work. His tutorials cover topics including lookup functions, data manipulation, cell formatting, keyboard shortcuts, and workflow efficiency. Allen's writing aims to make common Excel tasks clearer and faster, with step-by-step guidance suited to analysts and professionals who use Excel regularly in their work.

Read more articles by Allen Hoffman

Editorial standards

Fact Checking & Editorial Guidelines

Every article on Excel TV is held to a published editorial standard. The goal: accurate, current, and useful — without filler.

  1. Expert review.Drafts on technical Excel topics are reviewed by a contributor with hands-on, working knowledge of the feature being covered.
  2. Source validation.Claims about Excel behavior are tested in current Microsoft 365 builds. Third-party product claims are sourced from the vendor's own documentation.
  3. Disclosure.Affiliate links, sponsorships, and any commercial relationships that influenced a piece are disclosed in-line and at the foot of the article.
  4. Updates.Articles are revisited when Microsoft ships changes that affect the content. The most recent revision date is shown on every post.

Spot a problem? Email editor@excel.tv and we will look at it.

Subject-matter review

Reviewed by Subject Matter Experts

Technical Excel articles are reviewed by contributors with verifiable, hands-on experience in the topic — not generalist editors.

  • Qualified reviewers.Reviewers include Microsoft Excel MVPs, working business-intelligence practitioners, and Excel TV editorial staff. See each author's page for credentials.
  • Current to a known Excel build.Procedural articles state which Excel version they were validated against. Where Microsoft has since changed behavior, the article carries an inline update note.
  • Clarity check.Reviewers verify steps are reproducible by a reader at the assumed skill level — not just technically correct in a vacuum.

Want to contribute or review for Excel TV? See the about page.

Comments (2)

Historical comments preserved from the WordPress archive. Commenting is no longer active.

  1. Robert H. Gascon

    Hi Jordan,
    I’m surprised why you forgot to include my favorite LOOKUP. For me, it is the most powerful of all Excel functions, other than Dynamic Arrays.
    Cheers,
    Robert

    1. Jordan Goldmeier

      That’s fair. Honestly, I think I came in after the LOOKUP craze. I can’t even think of one time I’ve used it. Not saying it’s not useful, but it never really entered into my repertoire. But I have heard, as you say, that it is a favorite among the LOOKUP-ers. I appreciate you letting people know that it’s there and one of your Go-Tos!