How to Keep Excel Linked Data Correct When Sorting a Source Workbook
Question details
The user needs to maintain accurate external data links between workbooks when the source data is updated, alphabetized, or expanded with new rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Linking inventory prices from a source worksheet to a destination menu worksheet, moving files between computers, and updating source data.
- Observed behavior
- Adding new items and alphabetizing the source list causes the destination formulas to pull data from incorrect rows, even when using absolute cell references.
Ensure that your source data contains a column with stable, unique identifiers, such as an Item ID or an exact Item Name, which lookup formulas can use to find the correct data.
Use Lookup Formulas Instead of Direct Cell References
Replacing direct cell references with lookup formulas like XLOOKUP or INDEX/MATCH ensures data tracking stays accurate regardless of the item's row position.
Direct cell references point to physical row locations. When you sort a workbook, the data moves to a different row, but the formula keeps pointing to the original row number. A lookup formula searches for a unique item identifier instead of a row number.
Determine a unique identifier shared by both workbooks, such as the exact item name in Column A of your menu worksheet.
In the destination workbook, delete the old direct reference (e.g., ='$B1'). Type =XLOOKUP( into the cell, select the item name in your current sheet as the lookup value, and type a comma.
Navigate to the source workbook. Select the column containing the item names as the lookup array, type a comma, and then select the column containing the prices as the return array. Close the parenthesis and press Enter.

Convert Source Data into an Excel Table
Formatting your source data as a Table creates stable structured references that automatically adapt when data is sorted or expanded.
Manage Linked Workbooks Effortlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced data handling, complex external workbook links, and modern functions like XLOOKUP. You can build reliable linked menus and inventory sheets without worrying about broken references when you sort or update data.
- 1. Open linked workbooks: Launch WPS Spreadsheet and open both your source inventory file and destination menu file simultaneously.
- 2. Insert stable lookup formulas: Utilize built-in functions like XLOOKUP or VLOOKUP from the Formula tab to link values based on unique Item IDs instead of physical row addresses.
- 3. Save and transfer easily: Save your linked files in standard .xlsx format, allowing you to confidently move them between computers while maintaining accurate data relationships.

Frequently Asked Questions
Why don't absolute references ($A$1) fix sorting issues in linked sheets?
Absolute references lock a formula to a specific physical cell location, not to the data inside the cell. If you add rows or alphabetize the source data, the item moves to a new row, but the absolute reference blindly continues pointing to the original location, which now holds the wrong item.
How do I keep external links working when moving files between computers?
To prevent broken links, keep your source and destination workbooks in the same folder structure and move the entire folder together. If the file paths break after transferring to a new computer, open the destination workbook, navigate to the Data tab, click 'Edit Links', and point the broken reference to the new location of the source file.
What is the best formula to link pricing data across workbooks without errors?
XLOOKUP and INDEX/MATCH are the most reliable functions for cross-workbook data linking. By searching for a specific item identifier (like a SKU or exact item name) to return a price, these formulas remain completely immune to errors caused by sorting or inserting new rows in the source sheet.




