XLOOKUP in Excel: The New Era of Lookup Formulas

Suresh Nath
By -



Excel has long been a powerful tool for data analysis, and one of its most commonly used features has been the ability to search for and retrieve data. For decades, functions like VLOOKUP, HLOOKUP, and INDEX-MATCH have served this purpose. However, with the introduction of the XLOOKUP() function, Excel has entered a new era of lookup formulas.

XLOOKUP simplifies, enhances, and replaces many of the limitations found in older functions. This blog will take you through everything you need to know about XLOOKUP: syntax, use cases, benefits, examples, and even troubleshooting tips. Whether you are a beginner or a pro, this guide will help you unlock the full power of XLOOKUP.


What is XLOOKUP()?

The XLOOKUP function is a modern lookup function designed to overcome the limitations of older lookup methods like VLOOKUP and HLOOKUP. It allows you to search a range or array for a match and return a corresponding item from another range or array.

Introduced in Excel 365 and Excel 2019, XLOOKUP provides a more flexible and intuitive way to perform lookups.


Syntax of XLOOKUP

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Arguments:

  • lookup_value: The value to search for.

  • lookup_array: The range or array to search.

  • return_array: The range or array from which to return a value.

  • [if_not_found] (Optional): What to return if no match is found.

  • [match_mode] (Optional):

    • 0: Exact match (default)

    • -1: Exact match or next smaller item

    • 1: Exact match or next larger item

    • 2: Wildcard match

  • [search_mode] (Optional):

    • 1: Search from first to last (default)

    • -1: Search from last to first


Why XLOOKUP is Better than VLOOKUP or INDEX-MATCH

FeatureXLOOKUPVLOOKUPINDEX-MATCH
Lookup directionVertical & HorizontalOnly VerticalBoth
Search from bottomYesNoYes
Dynamic column referencingYesNoYes
Wildcard supportYesLimitedYes (complex)
Return multiple columnsYesNoNo
If Not Found handlingBuilt-inNoNo

Basic Examples of XLOOKUP

Example 1: Simple Lookup

=XLOOKUP("Apple", A2:A10, B2:B10)

This searches for "Apple" in A2:A10 and returns the corresponding value from B2:B10.

Example 2: Handling Missing Values

=XLOOKUP("Mango", A2:A10, B2:B10, "Not Found")

If "Mango" is not found, it returns "Not Found" instead of #N/A.

Example 3: Wildcard Match

=XLOOKUP("*berry", A2:A10, B2:B10, , 2)

Finds entries ending with "berry".


Horizontal Lookup Example

=XLOOKUP("Q2", B1:E1, B2:E2)

This retrieves data horizontally, similar to HLOOKUP but more intuitive.


Two-Way Lookup

=XLOOKUP("Product A", A2:A10, XLOOKUP("Q2", B1:E1, B2:E10))

Finds the value for "Product A" in quarter "Q2".


Using XLOOKUP with Drop-Down Lists

You can combine XLOOKUP with Data Validation to create interactive dashboards:

=XLOOKUP(G1, A2:A100, B2:B100)

Where G1 is a drop-down cell that changes the lookup value.


Common Errors and Fixes

ErrorCause and Fix
#N/AValue not found – check spelling or use [if_not_found] argument.
#VALUE!Mismatch in array sizes – make sure lookup_array and return_array are aligned.
Wrong OutputOften due to partial match or incorrect match_mode.

Best Practices

  • Use Named Ranges for cleaner formulas.

  • Always verify that lookup_array and return_array are of the same size.

  • Use [if_not_found] to improve user experience.

  • Combine with SORT, FILTER, or UNIQUE for advanced reports.


Real-Life Use Cases

1. Employee Management System

Fetch employee names, departments, or emails based on ID.

2. Sales Dashboard

Dynamically pull figures based on user-selected month or product.

3. Inventory Tracker

Retrieve stock levels, prices, or reorder status by item name or code.

4. Financial Reports

Automatically populate statements with current values by account code.


XLOOKUP in Google Sheets

XLOOKUP is not natively available in Google Sheets. As of now, you can use LOOKUP, INDEX-MATCH, or FILTER as alternatives.


Limitations of XLOOKUP

  • Available only in Excel 365 and 2019 onward.

  • Not backward compatible with older Excel versions.

  • Can be slower on very large datasets compared to INDEX-MATCH.


Thoughats From Our Side 

The XLOOKUP function is a game-changer for Excel users. With its simplified syntax, expanded functionality, and greater flexibility, it has effectively replaced older lookup functions. Whether you're building complex models or performing everyday data tasks, XLOOKUP offers the speed, power, and precision you need.

Explore its capabilities, integrate it into your workflows, and enjoy a new level of productivity and accuracy in your Excel spreadsheets.


XLOOKUP Excel formula
 XLOOKUP vs VLOOKUP
XLOOKUP examples
XLOOKUP not working
 Excel lookup function
dynamic lookup in Excel
XLOOKUP with drop-down
XLOOKUP multiple criteria
Excel 365 XLOOKUP
advanced Excel lookup