XLOOKUP across sheets fails for two main reasons: either the sheet reference in the lookup array or return array is not absolute, or the two ranges are different sizes. The fix is to use fully qualified, locked references such as Sheet2!$A$2:$A$100 and Sheet2!$B$2:$B$100, make sure both ranges start and end on the same rows, and confirm the lookup value exists in the first column of the lookup array. Once those three things are correct, XLOOKUP works across sheets exactly as it does on a single sheet.

What You'll Need

  • Excel 365, Excel 2021 or later, or Excel for the web (XLOOKUP is not available in Excel 2019 or earlier).
  • Two sheets in the same workbook: one holding the lookup value, one holding the data table.
  • Sheet names that contain no unquoted spaces or special characters, or the correct quoting if they do.
  • A lookup column where each value appears once, or a clear rule for which match you want.

Step-by-Step

  1. Confirm XLOOKUP is available. Type =XLOOKUP( in an empty cell. If Excel suggests the function, you are on a supported version. If it returns #NAME?, your version does not include XLOOKUP and you need to use INDEX/MATCH or upgrade.
  2. Name your sheets clearly. Rename the data sheet to something short and unique, such as Data, and the sheet with the formula to Report. Avoid spaces in sheet names where possible; if a name does contain a space, Excel requires single quotes around it, for example 'Sales Data'!$A$2:$A$100.
  3. Write the formula with fully qualified references. In the Report sheet, enter:
    =XLOOKUP(A2, Data!$A$2:$A$100, Data!$B$2:$B$100, "Not found")
    Here A2 is the lookup value on the current sheet, Data!$A$2:$A$100 is the lookup array on the other sheet, and Data!$B$2:$B$100 is the return array.
  4. Lock the ranges with dollar signs. Press F4 after selecting each range, or type the $ signs manually. Without them, dragging the formula down shifts the ranges and produces wrong results or #REF! errors. The lookup value should usually stay relative (no $) so it changes per row.
  5. Match the range sizes. The lookup array and return array must contain the same number of rows. If one is $A$2:$A$100 and the other is $B$2:$B$99, XLOOKUP returns #VALUE!. Select both ranges and check the row counts in the Name Box.
  6. Check the lookup column. XLOOKUP searches the first column of the lookup array. If your unique ID is in column C but you point the lookup array at column A, you will get #N/A even though the value exists. Point the lookup array at the column that actually holds the matching values.
  7. Handle text vs numbers. A common cause of #N/A across sheets is one sheet storing IDs as text (often left-aligned) and the other as numbers (right-aligned). Use VALUE() or TEXT() to convert, or clean the source data with Text to Columns.
  8. Add the optional arguments if needed. The fourth argument sets the if-not-found text. The fifth sets match mode: 0 for exact match, -1 for exact or next smaller, 1 for exact or next larger, 2 for wildcard. For most cross-sheet lookups, use 0 or leave it blank.
  9. Test with a known value. Copy a value from the data sheet into the lookup cell and confirm the formula returns the expected result. Then test a value that should not exist to confirm the if-not-found message appears.
  10. Fill down and verify. Drag the fill handle down the column. Spot-check three or four rows against the source sheet to make sure the locked references are behaving correctly.

Common Mistakes

  • Forgetting the sheet name. A formula like =XLOOKUP(A2, $A$2:$A$100, $B$2:$B$100) looks on the current sheet only. It will return #N/A if the data lives elsewhere.
  • Missing quotes around sheet names with spaces. Sales Data!$A$2:$A$100 is invalid; it must be 'Sales Data'!$A$2:$A$100.
  • Unequal range sizes. This is the most common cause of #VALUE! in cross-sheet XLOOKUP. Always verify both ranges span the same rows.
  • Relative references that shift on fill. If you copy the formula down and the ranges move, you forgot the $ signs.
  • Hidden or filtered rows. XLOOKUP reads hidden rows, so a value that looks missing may simply be filtered out of view. Clear filters before concluding the value is absent.
  • Trailing spaces in the lookup value. A value like "ABC " will not match "ABC". Use TRIM() on the lookup value or clean the source column.
  • Using a closed workbook. XLOOKUP can reference another open workbook, but references to closed workbooks may return #REF! or stale values. Keep both files open while working, or use Power Query to consolidate.

Tips

  • Use Excel Tables (Insert > Table) on the data sheet and reference them by name, for example Data[ID] and Data[Price]. Tables auto-expand, so the ranges stay correct as rows are added.
  • Define named ranges for frequently used cross-sheet ranges; formulas become shorter and easier to audit.
  • Press Ctrl+` (backtick) to toggle formula view and quickly spot missing sheet references.
  • Use the Evaluate Formula tool (Formulas > Evaluate Formula) to step through a failing XLOOKUP and see exactly which argument is wrong.
  • If you need to return multiple columns, XLOOKUP can spill a whole row or column when the return array is a multi-column range; just make sure the destination has empty cells to spill into.

Troubleshooting

#N/A returned. Check that the lookup value exists in the first column of the lookup array, that both are the same data type, and that there are no leading or trailing spaces. Use =TRIM(A2) and =ISNUMBER(A2) to diagnose.

#VALUE! returned. The lookup array and return array are different sizes. Select each range and compare the row counts.

#REF! returned. The sheet name is misspelled, the sheet was deleted, or the workbook containing the reference is closed. Re-enter the reference by clicking the sheet tab and selecting the range.

#NAME? returned. XLOOKUP is not supported in your Excel version, or the function name is misspelled. Check your version under File > Account.

Wrong result returned. The match mode may be set to approximate. Set the fifth argument to 0 for exact match, or leave it blank.

Formula works for one row but not others. The ranges are not locked. Add $ signs and re-fill.

If that did not work, rebuild the formula from scratch by typing =XLOOKUP( and using the formula wizard prompts, clicking each range on the correct sheet rather than typing references manually. This eliminates typos in sheet names and range addresses.

Frequently Asked Questions

Why does XLOOKUP return #N/A when the value clearly exists on the other sheet?

Almost always a data-type mismatch (text vs number) or hidden spaces. Check alignment of the cells and use TRIM or VALUE to normalize.

Can XLOOKUP reference a sheet in a different workbook?

Yes, but both workbooks should be open. References to closed workbooks can return errors or stale values. For a permanent link, consider Power Query.

Do I need dollar signs in cross-sheet XLOOKUP?

Yes, if you plan to fill the formula down or across. Lock the lookup and return arrays with $ so they do not shift.

Why does XLOOKUP return #VALUE! only on some rows?

The ranges are probably not the same size, or a relative reference has shifted. Verify both ranges span identical rows and that all references are locked.

Can I use XLOOKUP with a sheet name that contains a space?

Yes, but wrap the sheet name in single quotes: 'Sales Data'!$A$2:$A$100.

Does XLOOKUP work in Excel for the web and Mac?

Yes, in current versions of Excel for the web and Excel for Mac that support dynamic arrays. Older perpetual versions such as Excel 2019 do not include it.