Function Problems

Use XLOOKUP with a Linked Value from Another Excel Sheet

John WilsonJohn Wilson Dec 2, 2026 868 views

Question details

Use a linked employee ID from another worksheet as an XLOOKUP value and identify why the lookup may return an error.

Use XLOOKUP with a Linked Value from Another Excel Sheet
Product
Microsoft Excel
Device & OS
not provided
Scenario
An employee ID linked from another worksheet changes daily and is used to find a matching record.
Observed behavior
The lookup returns an error when using the linked value, but the exact error and formula are not provided.
Before you start

Locate the cell containing the linked employee ID and the columns containing the lookup IDs and results. Note the exact error message and whether the linked value comes from another worksheet or a separate workbook.

Solution 1Recommended

Check the XLOOKUP references and matching values

Use this method to verify that the linked ID and lookup range contain compatible values.

1
Check the formula

Select the result cell and inspect the formula bar. For example, =XLOOKUP(Sheet1!A2,Sheet2!A2:A100,Sheet2!B2:B100,"Not found") looks up the linked value in Sheet1!A2 against IDs in Sheet2 and returns the corresponding value from column B.

2
Compare the ID types

Select the linked ID and a matching ID in the lookup range. Use formulas such as =ISNUMBER(Sheet1!A2) and =ISTEXT(Sheet1!A2) in empty cells to check whether one ID is a number and the other is text. Convert the values to the same type while preserving any significant leading zeros.

3
Check for extra spaces

Inspect the ID cells for leading or trailing spaces. If appropriate, use =TRIM(A2) in a helper column to remove ordinary extra spaces from text IDs, then use the cleaned values in the lookup.

4
Test a known ID

Enter a known matching ID in a test cell and use that cell as the XLOOKUP lookup value. If it works, inspect the linked ID and its source; if it does not, recheck the lookup and return ranges.

Check the XLOOKUP references and matching values
Further diagnosis: If the error persists, the exact formula, error message, and a sample workbook with representative data are needed to identify the cause.
Work with linked spreadsheet values

Use a Linked Worksheet Value in WPS Spreadsheets

In a WPS Spreadsheets version that supports XLOOKUP, reference the linked ID cell and matching columns to return the corresponding record.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your workbook.
  2. 2. Locate the ranges: Select the worksheet containing the linked ID and note its cell reference. Then select the lookup worksheet and identify the ID and result columns.
  3. 3. Enter the lookup formula: Select an empty result cell and enter =XLOOKUP(Sheet1!A2,Sheet2!A2:A100,Sheet2!B2:B100,"Not found"), adjusting the sheet names and ranges for your workbook.
  4. 4. Verify the result: Press Enter and compare the result with a known ID. If it shows "Not found," check the linked value for data-type differences or extra spaces.
Look up an employee ID linked from another worksheet.Open and edit Microsoft Excel XLSX files.Inspect formulas and cell references in a familiar spreadsheet interface.
microsoft office alternative - wps office

Frequently Asked Questions

Can XLOOKUP use a cell linked from another worksheet?

Yes. Reference the linked cell as the lookup value, such as Sheet1!A2. XLOOKUP uses the value in that cell, regardless of whether it was entered directly or produced by a formula.

Why does XLOOKUP return a not-found result for an ID that looks identical?

The linked ID may be text while the lookup ID is a number, or one value may contain extra spaces. Use ISNUMBER or ISTEXT to compare types and inspect the cells for spaces.

How do I reference a worksheet name that contains spaces?

Enclose the sheet name in single quotes, for example, 'Employee Data'!A2. Use the same syntax when referencing lookup or return ranges on that sheet.

Why does the linked ID not change when the source changes?

Check the linked cell's formula and confirm the source is accessible. For external data connections, try Data > Refresh All; for workbook links, check Data > Workbook Links or Edit Links where available. Also check Formulas > Calculation Options > Automatic.