XLOOKUP is the modern, better replacement for VLOOKUP. It's more flexible, easier to read, and available in Excel 365 and Excel 2019+. Yet many users still struggle with it — the argument order is different, the match modes are confusing, and #N/A errors appear without clear explanation.
Claude handles XLOOKUP very well. Describe what you want to look up and what you need to return, and it writes the correct formula with the right match mode and error handling. If your existing XLOOKUP is broken, paste it in and Claude will diagnose and fix it quickly.
XLOOKUP vs VLOOKUP — why XLOOKUP wins:
- You describe what you need to find and Claude writes the XLOOKUP formula with all arguments correct
- Claude chooses the right match mode — exact, approximate, or wildcard
- Claude handles complex cases — looking left, returning multiple columns, nested XLOOKUPs
- Claude converts old VLOOKUPs to XLOOKUP cleanly, including column index fixes
Not on Excel 365 or 2019? Tell Claude your Excel version and it will write INDEX/MATCH instead — which works in all versions and has the same advantages over VLOOKUP. Claude handles the conversion automatically.
Six steps — from describing your lookup to a tested, production-ready formula.
Clearly define what you need
Tell Claude the lookup value, the column where it's located, and the column you want to return. One sentence is enough: "Look up employee ID in column A of the Staff sheet and return their salary from column D."
Provide the data location
Specify the sheet name, the range, and whether the data has a fixed size or grows. Claude uses this to write references that won't break when rows are added.
Get the formula
Claude writes the full XLOOKUP, explains the key arguments, and chooses the right match mode — exact match for IDs and codes, approximate for tiered pricing or grades, wildcard for partial text searches.
Test immediately
Always test with a value you know should work. If it returns #N/A, send Claude the formula and 3 sample rows. The cause is almost always a data type mismatch or trailing space — Claude finds it instantly.
Add error handling
Once the formula works, wrap it with IFERROR to return a blank, dash, or "Not Found" instead of #N/A for genuinely missing values. Or use the built-in 4th argument of XLOOKUP — Claude will show you both options.
Convert old VLOOKUPs
Paste any existing VLOOKUP formulas into Claude and ask it to rewrite them as XLOOKUP. Claude handles the conversion cleanly — including fixing the hardcoded column index numbers that break when columns are inserted.
Copy these prompts into Claude. Replace the bracketed placeholders with your actual data and column references.
Build from scratch
Debug a broken XLOOKUP
Convert VLOOKUP to XLOOKUP