Industry:Software Added By:Admin Posted On:Nov. 27, 2026
Key points
XLOOKUP vs VLOOKUP comes down to how each one finds the answer. VLOOKUP searches the first column of a table and returns a column you pick by number, and if you leave out its last argument it runs an approximate match. XLOOKUP takes a separate search range and return range, so it can look left, and it returns an exact match unless you ask for something else. The catch is version support: Microsoft says XLOOKUP is not available in Excel 2016 or Excel 2019, so a shared workbook can break for colleagues still on those versions.
Below is each difference side by side, a small training-record table you can rebuild to test every formula, a conversion cheat sheet, and the cases where VLOOKUP is still the safer choice.
Both functions return a value from the row where a match is found. The rows below follow Microsoft’s XLOOKUP, VLOOKUP and INDEX function pages.
| Feature | VLOOKUP | XLOOKUP | INDEX/MATCH |
|---|---|---|---|
| How it finds the return column | A column number (col_index_num) counted from the left edge of table_array | A separate return_array range | INDEX returns from a range; MATCH supplies the row position |
| Default match type | Approximate (range_lookup TRUE) when the fourth argument is left out; the first column must be sorted | Exact match (match_mode 0) | MATCH defaults to match_type 1 (approximate, ascending order); use 0 for exact |
| Look up to the left | Not directly: the lookup value must be in the first column of table_array | Yes | Yes |
| A column is inserted inside the table | The typed column number does not change, so the formula can return the wrong column | The ranges shift with the data | The ranges shift with the data |
| Value not found | #N/A; wrap in IFNA or IFERROR to show text | Built-in if_not_found argument | #N/A; wrap in IFNA or IFERROR |
| Return several columns | One formula per column | One formula; the result spills into neighboring cells | INDEX with column_num 0 returns the whole row as an array (entered with Ctrl+Shift+Enter over the output range in Excel 2016 or 2019) |
| Search last to first | No; it returns the first match | Yes, search_mode -1 | Not with MATCH; XMATCH has search_mode -1 (Microsoft 365, 2021, 2024 and web; not 2016 or 2019) |
| Wildcards (* and ?) | Yes, in exact-match mode with a text lookup value | Only with match_mode 2 | Yes, with match_type 0 |
| Excel versions | Microsoft 365, 2024, 2021, 2019, 2016, web | Microsoft 365, 2024, 2021, web and mobile apps; not 2019 or 2016 | Microsoft 365, 2024, 2021, 2019, 2016, web |
Watch the default match type. A VLOOKUP typed with three arguments is an approximate match. On an unsorted list, or when the value is missing, it can return another row’s value instead of an error. The worked example below shows this with a missing employee ID.
Microsoft gives the syntax as:
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
Compare it with =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). VLOOKUP needs the whole table and a column count; XLOOKUP needs only the column you search and the column you want back.
| Argument | Value | What it does (Microsoft’s description) |
|---|---|---|
| if_not_found | Any text, number or formula | Returned when no valid match is found; if it is left out, #N/A is returned |
| match_mode | 0 (default) | Exact match; #N/A if none is found |
| match_mode | -1 | Exact match, or the next smaller item |
| match_mode | 1 | Exact match, or the next larger item |
| match_mode | 2 | Wildcard match, where *, ? and ~ have special meaning |
| search_mode | 1 (default) | Search from the first item |
| search_mode | -1 | Reverse search from the last item |
| search_mode | 2 or -2 | Binary search on data sorted ascending (2) or descending (-2); unsorted data gives invalid results |
Because if_not_found comes before match_mode, a formula that sets a match mode also has to fill or skip the fourth argument. The formulas in this guide fill it with text, which makes the result easier to read.
Type this table into a blank sheet starting at cell A1 (headers in row 1), then put E-103 in cell H2 and E-109 in cell H3. E-109 is deliberately missing from the list. Every result below was worked out from these rows.
| Name (A) | Employee ID (B) | Department (C) | Course (D) | Hours (E) |
|---|---|---|---|---|
| Ana Ruiz | E-101 | Payroll | BSA/AML | 2 |
| Ben Cole | E-102 | HR | Harassment prevention | 1 |
| Cara Diaz | E-103 | Finance | BSA/AML | 2 |
| Dev Patel | E-104 | HR | HIPAA basics | 1.5 |
| Eli Moss | E-105 | Payroll | HIPAA basics | 1.5 |
To return the department for the ID in H2, VLOOKUP needs a table that starts at the ID column (B) and the column number of Department within it (2):
=VLOOKUP(H2,B2:E6,2,FALSE) returns Finance.
XLOOKUP names the two columns directly:
=XLOOKUP(H2,B2:B6,C2:C6) returns Finance.
Now insert a new column between B and C. The VLOOKUP table becomes B2:F6 but the 2 stays 2, so the formula returns whatever is in the new column. The XLOOKUP becomes =XLOOKUP(H2,B2:B6,D2:D6) on its own and still returns Finance.
The name sits in column A, to the left of the ID. VLOOKUP cannot return it from this layout because the lookup value must be in the first column of table_array. XLOOKUP can:
=XLOOKUP(H2,B2:B6,A2:A6) returns Cara Diaz.
In Excel 2016 or 2019 the same result comes from =INDEX(A2:A6,MATCH(H2,B2:B6,0)).
=VLOOKUP(H3,B2:E6,2,FALSE) returns #N/A, because E-109 is not in the list. To show text instead, VLOOKUP needs a wrapper:
=IFNA(VLOOKUP(H3,B2:E6,2,FALSE),"Not found") returns Not found.
XLOOKUP has the argument built in:
=XLOOKUP(H3,B2:B6,C2:C6,"Not found") returns Not found.
IFNA reacts only to #N/A. IFERROR, which many older workbooks use, also hides other errors, such as a broken reference, so a real problem can look like a missing record.
Leave out the fourth argument and VLOOKUP runs an approximate match:
=VLOOKUP(H3,B2:E6,2) returns Payroll.
That is Eli Moss’s department. The IDs are sorted, and an approximate match returns the largest value that is less than or equal to the lookup value, which is E-105. A report built this way would show a training record for an employee who is not on the list. The XLOOKUP equivalent, =XLOOKUP(H3,B2:B6,C2:C6), returns #N/A because exact match is its default.
=XLOOKUP(H2,B2:B6,C2:E6) returns Finance, BSA/AML and 2 in three cells side by side. Microsoft calls this spilling: the cells to the right must be empty, or Excel shows a #SPILL! error, and spilled formulas don’t work inside an Excel table, so put the formula in the grid beside the table.
Converting a VLOOKUP is mechanical once you know which column of table_array it returns. Work through these steps for each formula you change:
Results use the sample table above, with E-103 in H2 and E-109 in H3.
| Task | VLOOKUP or older pattern | XLOOKUP pattern | Result |
|---|---|---|---|
| Exact match | =VLOOKUP(H2,B2:E6,2,FALSE) | =XLOOKUP(H2,B2:B6,C2:C6) | Finance |
| Text when not found | =IFNA(VLOOKUP(H3,B2:E6,2,FALSE),"Not found") | =XLOOKUP(H3,B2:B6,C2:C6,"Not found") | Not found |
| Approximate match on sorted, unique IDs | =VLOOKUP(H2,B2:E6,2,TRUE) | =XLOOKUP(H2,B2:B6,C2:C6,"Not found",-1) | Finance |
| Return a column to the left | =INDEX(A2:A6,MATCH(H2,B2:B6,0)) | =XLOOKUP(H2,B2:B6,A2:A6) | Cara Diaz |
| Several columns | Three VLOOKUPs with column numbers 2, 3 and 4 | =XLOOKUP(H2,B2:B6,C2:E6) | Finance, BSA/AML, 2 |
| Wildcard | =VLOOKUP("E-10*",B2:E6,2,FALSE) | =XLOOKUP("E-10*",B2:B6,C2:C6,"Not found",2) | Payroll (first ID starting E-10) |
Check the wildcard row carefully when you convert. VLOOKUP treats * and ? as wildcards in exact-match mode, while XLOOKUP treats them as wildcards only in match_mode 2. Without the 2, the XLOOKUP looks for the literal text “E-10*” and returns Not found.
A training log is a good example of a two-condition lookup: one employee, one course. Type this log on a second sheet starting at A1, then put E-101 in F2 and BSA/AML in G2. Employee E-101 took BSA/AML twice.
| Employee ID (A) | Course (B) | Score (C) |
|---|---|---|
| E-101 | BSA/AML | 78 |
| E-102 | HIPAA basics | 91 |
| E-101 | HIPAA basics | 88 |
| E-103 | BSA/AML | 84 |
| E-101 | BSA/AML | 95 |
| E-102 | BSA/AML | 80 |
XLOOKUP can search a calculated array, so no helper column is needed:
=XLOOKUP(1,(A2:A7=F2)*(B2:B7=G2),C2:C7) returns 78.
Each comparison gives TRUE or FALSE for every row; multiplying them gives 1 only where both conditions are true, and XLOOKUP looks for that 1. It returns the first match, row 2. To get the latest attempt in a log kept in date order, search from the bottom:
=XLOOKUP(1,(A2:A7=F2)*(B2:B7=G2),C2:C7,"No record",0,-1) returns 95.
Joining the keys also works: =XLOOKUP(F2&"|"&G2,A2:A7&"|"&B2:B7,C2:C7) returns 78. The | separator stops two different pairs from joining into the same text. To list every attempt rather than one, FILTER (same Excel versions as XLOOKUP) returns 78 and 95: =FILTER(C2:C7,(A2:A7=F2)*(B2:B7=G2)).
VLOOKUP has no multiple-criteria form. In Excel 2016 or 2019, add a helper column D with =A2&"|"&B2 filled down to D7, then use =INDEX(C2:C7,MATCH(F2&"|"&G2,D2:D7,0)), which returns 78. Without a helper column, =INDEX(C2:C7,MATCH(1,(A2:A7=F2)*(B2:B7=G2),0)) also returns 78, but in those versions it has to be entered with Ctrl+Shift+Enter. A VLOOKUP version works only if the helper column is the first column of table_array, which usually means inserting it to the left of the data. If you need counts per course rather than one value per row, a pivot table is the better tool; the guide to pivot table count unique values shows how.
Microsoft publishes no timing comparison between XLOOKUP and VLOOKUP, so treat any blanket claim with caution. What Microsoft does document, in its Excel performance guidance on Microsoft Learn, explains where lookup time goes:
That guidance covers VLOOKUP, HLOOKUP and MATCH; it does not mention XLOOKUP. The XLOOKUP page describes search_mode 2 and -2 as binary searches that rely on sorted data and return invalid results if the data is not sorted, but gives no timing. For a large payroll or HR file, the practical answer is to test. Copy the workbook, fill one column with each version of the formula, set calculation to Manual and time a full recalculation with Ctrl+Alt+F9 on Windows.
INDEX/MATCH did the jobs XLOOKUP was built for, years earlier: left lookups, separate return ranges and two-way lookups with a second MATCH for the column. XLOOKUP does the same in one function, with exact match as the default and a built-in not-found argument, and Microsoft’s XLOOKUP page shows a nested XLOOKUP doing the two-way lookup. Keep INDEX/MATCH when:
If you like the INDEX/MATCH pattern but want exact match by default, XMATCH is the newer MATCH; Microsoft lists it for Microsoft 365, Excel 2021, Excel 2024 and the web, not Excel 2016 or 2019. Always type the 0 in MATCH: its default, 1, is an approximate match that expects sorted data.
Google Sheets has its own XLOOKUP function. Google’s syntax is XLOOKUP(search_key, lookup_range, result_range, missing_value, match_mode, search_mode). The names differ, but the order and the mode numbers match Excel: match_mode 0, 1, -1 and 2, and search_mode 1, -1, 2 and -2, with missing_value returning #N/A by default.
A Sheets user having XLOOKUP does not help a colleague who opens the exported .xlsx file in Excel 2016 or 2019; the version rules below still apply.

XLOOKUP is available in Excel for Microsoft 365 (Windows and Mac), Excel for the web, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, and the Excel apps for iPad, iPhone and Android. Microsoft’s “What’s new in Excel 2021” pages for Windows and Mac name XLOOKUP as one of that release’s new functions. The XLOOKUP page states in a note that XLOOKUP is not available in Excel 2016 and Excel 2019, even though the page’s “Applies to” header also names those two versions; go by the note. VLOOKUP, INDEX and MATCH are listed for Excel 2016 and 2019 as well as the newer versions.
Microsoft’s support article on the _xlfn. prefix describes the symptom: an _xlfn. prefix appears in front of a function the running version does not support, and when the formula is calculated it shows the #NAME? error. For XLOOKUP that would read like =_xlfn.XLOOKUP(…). Because the error appears on calculation, don’t count on the results saved in the file staying visible. Microsoft’s formula compatibility notes suggest replacing new functions with ones the older version has, or replacing the formulas with their results.
Before you send a workbook outside your team, search it: press Ctrl+F, open Options, set Within to Workbook and Look in to Formulas, and search for XLOOKUP, then XMATCH and FILTER. Excel’s Compatibility Checker (File > Info > Check for Issues > Check Compatibility on Windows) can also help flag functions that earlier versions lack.
In each case, check that every VLOOKUP ends in FALSE or 0. That one argument prevents the missing-ID error shown above.
VLOOKUP searches the first column of a table and returns a column you choose by number, and it runs an approximate match unless you add FALSE as the fourth argument. XLOOKUP takes a separate search range and return range, so it can look left, defaults to an exact match, has a built-in argument for the result when nothing is found, and can search from the last row up. XLOOKUP is not available in Excel 2016 or Excel 2019; VLOOKUP is.
Not all at once. Use XLOOKUP for new formulas in workbooks that are opened only in Excel for Microsoft 365, Excel 2021, Excel 2024 or Excel for the web, and convert old VLOOKUPs when you next edit them. Keep VLOOKUP or INDEX/MATCH in files that anyone opens in Excel 2016 or 2019, and check that every VLOOKUP you keep ends in FALSE or 0.
XLOOKUP is available in Excel for Microsoft 365 on Windows and Mac, Excel 2024 and Excel 2024 for Mac, Excel 2021 and Excel 2021 for Mac, Excel for the web, and the Excel apps for iPad, iPhone and Android. Microsoft’s XLOOKUP page states in a note that it is not available in Excel 2016 or Excel 2019, even though its Applies To header names those versions.
Microsoft’s support article on the _xlfn. prefix says the prefix appears in front of a function the running version does not support, and the formula shows a #NAME? error when it is calculated. Before sending the file, search its formulas for XLOOKUP (and XMATCH or FILTER), and either use VLOOKUP or INDEX/MATCH in that workbook or replace the formulas with their results.
Yes. Search for 1 in a calculated array that multiplies the conditions, for example =XLOOKUP(1,(A2:A7=F2)*(B2:B7=G2),C2:C7), which returns the first row where both conditions are true. Add a search_mode of -1 to return the last matching row instead. VLOOKUP has no multiple-criteria form; in Excel 2016 or 2019 use INDEX and MATCH with a helper column that joins the keys, or as an array formula entered with Ctrl+Shift+Enter.
Microsoft publishes no timing comparison between the two. Its performance guidance says exact-match lookups take longer the more cells they scan, approximate searches on sorted data are fast, and restricting the range scanned speeds up exact-match lookups. On a large file, time both formulas with a full recalculation (Ctrl+Alt+F9 on Windows) before switching for speed.
Yes. Google Sheets has an XLOOKUP function with the arguments search_key, lookup_range, result_range, missing_value, match_mode and search_mode, using the same mode numbers as Excel. Its VLOOKUP also defaults to an approximate match unless is_sorted is set to FALSE, which Google recommends for exact matches.
Go beyond VLOOKUP with better lookups
David H. Ringstrom, CPA’s recorded 90-minute webinar shows why VLOOKUP stops at the first match, why INDEX and MATCH is often the better option, and how IFNA, SUMIFS and other lookup functions make spreadsheets less prone to errors. Watch any time.
See the lookup functions webinarThis article is general information, not legal or tax advice. Check the official sources above or consult a qualified advisor for your situation.