TGViewer
MS Excel for Data Analysis MS Excel for Data Analysis @excel_analyst ยท 73.1K subscribers
Post #2242 3K
๐Ÿ“Š Excel Basics #21 โ€“ XLOOKUP() Function

The "XLOOKUP()" function is the modern replacement for both "VLOOKUP()" and "HLOOKUP()". It is more flexible, easier to use, and solves many of the limitations of older lookup functions.

ยซNote: "XLOOKUP()" is available in Microsoft 365 and Excel 2021+. It is not available in Excel 2019 or earlier.ยป

๐Ÿ“Œ What is the XLOOKUP() Function?
"XLOOKUP()" searches for a value in one range and returns the corresponding value from another range.

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

Unlike "VLOOKUP()", you don't need to specify a column number.

๐Ÿ“Œ Example 1 โ€“ Find Employee Department
ID | Name | Department
101 | Rahul | IT
102 | Priya | HR
103 | Amit | Finance
104 | Neha | Marketing

Formula:
=XLOOKUP(103,A2:A5,C2:C5)

Result: Finance

๐Ÿ“Œ Example 2 โ€“ Using a Cell Reference

If cell E2 contains an Employee ID:

=XLOOKUP(E2,A2:A5,C2:C5,"Employee Not Found")

If the ID exists, Excel returns the department.
If it doesn't exist, Excel displays: Employee Not Found

๐Ÿ“Œ Why XLOOKUP() is Better than VLOOKUP()
โœ… Looks up values from left to right and right to left
โœ… No need to count column numbers
โœ… Built-in if_not_found argument
โœ… Works with both vertical and horizontal data
โœ… More reliable when columns are inserted or deleted

๐Ÿ“Œ VLOOKUP vs XLOOKUP()
VLOOKUP()
โ€ข Searches only left to right
โ€ข Uses column index numbers
โ€ข Requires IFERROR() to handle missing values

XLOOKUP()
โ€ข Searches in any direction
โ€ข Uses lookup and return ranges
โ€ข Has built-in error handling
โ€ข Easier to read and maintain

๐Ÿ“Œ Real-World Uses
โ€ข Find employee information
โ€ข Retrieve product prices
โ€ข Match customer records
โ€ข Search invoice details
โ€ข Build interactive dashboards

๐Ÿ“Œ Common Mistakes
โ€ข Using lookup and return arrays of different sizes
โ€ข Trying to use "XLOOKUP()" in older Excel versions
โ€ข Referencing the wrong lookup range

โœ… Best Practices
โ€ข Use "XLOOKUP()" instead of "VLOOKUP()" whenever available
โ€ข Use the "if_not_found" argument to display meaningful messages
โ€ข Keep the lookup and return arrays the same size
โ€ข Use structured table references for dynamic formulas

๐Ÿ’ก Bonus Example โ€“ Return Multiple Columns
=XLOOKUP(E2,A2:A5,B2:C5)
If supported by your Excel version, this returns both the Name and Department for the matching Employee ID.

"XLOOKUP()" is one of the most valuable Excel functions for modern data analysis and is becoming the preferred lookup function across industries.

Double Tap โค๏ธ For More
  • โค 15
More from @excel_analyst
  1. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  2. Oct 7, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 5 This part focuses on Tables, Filters & Data Analysis shortcutsโ€ฆ
  3. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  4. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  5. Sep 29, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 3 This part focuses on Formatting Shortcuts โ€” quickly format celโ€ฆ
  6. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’