← 30 Days Excel Series
Day 7 of 30IntermediateLookup Functions

Day 7: XLOOKUP & Modern Lookup Functions

5 questions · Excel Interview Preparation

Q1

What is XLOOKUP and what are its main advantages over VLOOKUP?

XLOOKUP is available in Excel 365 and Excel 2021. Syntax: =XLOOKUP(lookup_value, lookup_array, return_array, [not_found], [match_mode], [search_mode]). Main advantages: (1) Can look in any direction — no leftmost-column restriction. (2) Returns the exact column(s) you reference, not a number. (3) Has a built-in not_found parameter — no need for IFERROR wrapper. (4) Can return multiple columns at once. (5) Supports exact, approximate, and wildcard matching modes natively.

💡 Interview tip: If the company uses Excel 365, prefer XLOOKUP in your answers. For backward compatibility, stick to INDEX-MATCH.
Q2

Write an XLOOKUP to return a customer's name and city from a CustomerID.

=XLOOKUP(A2, CustomerTable[CustomerID], CustomerTable[[Name]:[City]], "Not Found"). This single formula returns both Name and City columns — something VLOOKUP cannot do. The return_array references a range spanning two columns. If the CustomerID is not found, "Not Found" is returned instead of an error.

💡 Interview tip: The ability to return multiple columns in one formula is one of XLOOKUP's most useful features.
Q3

What is the match_mode parameter in XLOOKUP?

match_mode controls how XLOOKUP handles matching: 0 = exact match (default). -1 = exact match or next smaller. 1 = exact match or next larger. 2 = wildcard match (use * for any characters, ? for one character). Wildcard example: =XLOOKUP("*Delhi*", CityColumn, NameColumn,, 2) finds any city containing "Delhi".

💡 Interview tip: Wildcard mode (2) is very useful for partial text matching — more powerful than VLOOKUP's approximate mode.
Q4

What does the search_mode parameter do in XLOOKUP?

search_mode controls search direction: 1 = search from first item (default). -1 = search from last item (finds the last match — useful for most recent transaction). 2 = binary search ascending (faster, requires sorted data). -2 = binary search descending. The search from last item (-1) mode is unique to XLOOKUP and solves a common problem elegantly: "find the most recent transaction for this customer" without needing additional filtering.

💡 Interview tip: -1 search mode (find last match) is a killer feature — know it for mid-to-senior level interviews.
Q5

How does XMATCH compare to MATCH?

XMATCH is the modern replacement for MATCH, also available in Excel 365. Key improvements: supports wildcard matching, search from last item, and binary search. Syntax: =XMATCH(lookup_value, lookup_array, [match_mode], [search_mode]). In practice, XMATCH is used whenever you need the position of a value, and it is more flexible than MATCH for partial matches and reverse searches. Combined with INDEX, it is as powerful as XLOOKUP.

💡 Interview tip: XMATCH returning position + INDEX for value retrieval = same power as XLOOKUP but sometimes clearer for complex scenarios.
← Day 6All DaysDay 8

Want 1:1 Excel coaching?

Join EVIKA Academy for live Excel training, real projects, and placement support in Delhi NCR.

Book Free Demo →
Best Data Analytics Course in Noida Delhi NCR | EVIKA ACADEMY