Convert VLOOKUP to XLOOKUP Without Rewriting It
How to convert a VLOOKUP to XLOOKUP: the column number becomes a return range, IFERROR wrappers become the not-found argument, and MATCH column numbers are kept.

To convert a VLOOKUP to XLOOKUP, the first column of the table becomes the lookup range and the column number becomes a return range. Doing this by hand across many formulas is slow and easy to get wrong, because one slip in a column letter changes the result. The XLOOKUP vs INDEX-MATCH Generator converts the formula you paste and updates the conversions as you type.
How the column number becomes a return range
A VLOOKUP has a table, a column number and a match type. XLOOKUP separates the table into two ranges: the column that is searched and the column that is returned. Take this formula:
=VLOOKUP(F2,$A$2:$D$500,3,FALSE)
The table is $A$2:$D$500, so the search column is A. The column number 3 selects the third column of the table, which is column C. The XLOOKUP equivalent is:
=XLOOKUP(F2,$A$2:$A$500,$C$2:$C$500)
The table $A$2:$D$500 with the number 3 becomes the return range $C$2:$C$500. Dollar signs and sheet names are kept, so a formula that points to Data!$A$2:$D$500 keeps its sheet name and its fixed references. XLOOKUP uses an exact match by default, which is what FALSE asked for in the VLOOKUP.

Steps
- Open the XLOOKUP vs INDEX-MATCH Generator.
- Paste the VLOOKUP, for example the one above.
- Read the three results. The XLOOKUP version comes first, then the INDEX/MATCH version, and your original formula is repeated at the end for comparison.
- Copy the XLOOKUP into a copy of your sheet and compare the result with the original for a few rows.

Because the conversions update as you type, you can change the column number or the range and see the new return range at once. This is a quick way to check that column 3 of your table is the column you meant. If the result is a different column, the original formula had the wrong number. A number larger than the width of the table is the classic cause of a #REF! error, which Fix #REF! in Excel VLOOKUP: Causes and Fixes explains.
An approximate match, with TRUE or no fourth argument, needs more care. XLOOKUP is exact by default, so an approximate lookup needs a match mode. The comparison of the styles is in XLOOKUP vs INDEX/MATCH: Which One to Use.
IFERROR wrappers
Many VLOOKUPs are wrapped in IFERROR to show a text instead of #N/A:
=IFERROR(VLOOKUP(F2,$A$2:$D$500,3,FALSE),"Not found")
XLOOKUP can carry the text in its own argument for the not-found case, so the wrapper is no longer needed:
=XLOOKUP(F2,$A$2:$A$500,$C$2:$C$500,"Not found")
The two are not exactly the same. IFERROR hid every error in the formula, and the fourth argument of XLOOKUP replaces only the case where no match is found. Other errors, such as a broken range, now show up instead of being hidden, which is usually what you want while auditing a workbook.
Formulas with a MATCH column number
Some VLOOKUPs take the column number from MATCH, so that the formula follows a header name:
=VLOOKUP($A2,Data!$A$2:$Z$500,MATCH(B$1,Data!$1:$1,0),FALSE)
A column number from MATCH(B$1, Data!$1:$1, 0) becomes INDEX(table, 0, ...) in the return range. INDEX with a row number of 0 returns a whole column of the table, and MATCH chooses which one. The converted formula therefore keeps the header-based lookup instead of replacing it with a fixed column.
Check the result carefully. The header row in MATCH must cover the same columns as the table, so that the position found by MATCH is the position in the table.
What is not converted
The tool rebuilds a VLOOKUP from plain ranges. If the table is a named range, a structured table reference or the result of another function, replace it with a plain range such as $A$2:$D$500 first, and then paste the formula again.
Other limits to know:
- Two-way lookups, which search in both rows and columns, are not converted.
- The formula can be up to 8,192 characters long.
- A formula with a missing bracket is not converted. The tool gives the specific reason instead.

If a converted formula returns an error in your sheet, paste it into the Excel Formula Debugger and pick the error. For lookups to the left of the search column, see Look Up a Value to the Left in Excel. Microsoft describes the function in XLOOKUP function, including the versions of Excel that have it.
Do it with your own data
Open the XLOOKUP vs INDEX-MATCH Generator, paste one of your VLOOKUPs and read the XLOOKUP. Test it on a copy of your data, compare a handful of rows with the original, and then convert the others the same way.