How to Create Automatic Excel Hyperlinks When Rows Change
Question details
The user needs to create hyperlinks between a database sheet and a notes sheet that dynamically update and do not break when rows are sorted or new records are added.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Linking related data records across multiple worksheets in a growing or frequently sorted spreadsheet.
- Observed behavior
- Standard cell reference hyperlinks break or point to incorrect data when records are inserted or when the target worksheet is sorted.
Ensure both your database and notes worksheets have a unique identifier column (like an ID number) to establish a stable connection for your dynamic formulas.
Use Dynamic Formulas with an Excel Table and Unique Key
Combine the HYPERLINK function with a lookup function like XMATCH or MATCH to find records by a unique ID instead of relying on a static row number.
By utilizing structured references within an Excel Table, your formulas automatically adjust as the data range expands. Pairing HYPERLINK with an INDEX and MATCH combination ensures the link always points to the correct record by searching for a stable identifier rather than a fixed physical cell address.
Select the data range in both your Database and Notes worksheets, then press Ctrl+T to convert them into Excel Tables.
Verify that both tables share a column with a unique key, such as 'Record ID' or 'Item Number'.
In the cell where you want the link, enter a formula that returns the cell address based on a lookup. For example: =HYPERLINK("#"&CELL("address",INDEX(Notes!A:A,MATCH([@[Record ID]],Notes!A:A,0))), "Go to Notes").
Click the newly created link to ensure it navigates correctly, then try sorting the Notes worksheet to verify the link dynamically updates to follow the correct row.

Create Dynamic Links Seamlessly in WPS Spreadsheet
WPS Office offers a powerful, fully compatible Spreadsheet tool that handles complex lookup formulas, dynamic hyperlinks, and Table formatting flawlessly without the heavy resource usage.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your database and notes worksheets.
- 2. Format as Table: Select your data range and click 'Format as Table' from the Home tab to ensure dynamic range updates.
- 3. Enter the lookup formula: Type =HYPERLINK in your target cell and nest a MATCH or XLOOKUP function to dynamically locate your unique ID's cell address.
- 4. Apply and test: Press Enter to apply the formula. You can now freely sort or insert rows while your hyperlinks remain perfectly accurate.

Frequently Asked Questions
Why do my standard Excel hyperlinks break when I sort data?
Standard hyperlinks usually point to a fixed physical cell address (like Sheet2!A5). When you sort or insert rows, the data moves to a new row, but the hyperlink formula remains unchanged, meaning it still points to the old, static location.
Can I use VLOOKUP inside a HYPERLINK function?
You cannot use VLOOKUP directly to define the link destination because VLOOKUP returns the actual cell value, not the cell reference. To create a working dynamic link, you need a function combination that returns a cell address, such as CELL combined with INDEX and MATCH.
What is the syntax for creating an internal hyperlink to another sheet?
To link to another sheet in the same workbook using the HYPERLINK function, you must prefix the cell reference with a hash symbol (#). For example: =HYPERLINK("#Sheet2!A1", "Click Here").




