How to Keep Manual Excel Notes Matched to Imported SQL Server Rows
Question details
The user needs to maintain the alignment of manual notes and priorities with SQL Server data imported into Excel, which currently shifts and becomes mismatched when rows are added or deleted during a data refresh.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Tracking file progress by dynamically pulling file numbers from a SQL server and typing manual notes or priorities in adjacent columns.
- Observed behavior
- Manual entries become misaligned and attached to the wrong records when the imported SQL data refreshes, changing the row positions by inserting or removing files.
Ensure your imported SQL Server data contains a unique identifier (such as a primary key, unique file number, or transaction ID) for each row, as this is mandatory for linking manual notes securely.
Separate Manual Notes and Use XLOOKUP with Unique IDs
This method separates dynamic imported data from manual inputs, using lookup formulas to dynamically align them by a unique identifier rather than a vulnerable row position.
Typing directly next to a dynamic data table often leads to mismatched data because Excel does not inherently tie the manual cell to the adjacent imported record. By keeping manual notes in their own dedicated table, you can use lookup formulas to bring the notes into your main view dynamically.
Create a new worksheet named 'Manual_Notes'. Set up columns for your 'Unique File ID', 'Priority', and 'Notes'. Enter your tracking information here, ensuring every row features the correct unique ID from the server.
Navigate to the sheet containing your dynamic SQL Server data. Click on the first blank column header next to your imported data and name it 'Manual Notes'.
In the first data cell of your new column (e.g., cell D2), enter the formula: =XLOOKUP(A2, Manual_Notes!A:A, Manual_Notes!C:C, ""). Replace 'A2' with the cell containing your Unique ID in the dynamic table.
Drag the fill handle down to apply this formula to all rows in your imported table. When the SQL data refreshes and rows shift, the formula will automatically fetch the correct manual note based on the ID.

Merge Data Using Power Query
Use Power Query to digitally join the live SQL Server connection with your local manual notes table, producing a unified, error-free output.
Keep Notes Aligned Automatically in WPS Spreadsheet
WPS Spreadsheet provides powerful data handling and advanced lookup functions, allowing you to effortlessly match imported database records with manual annotations without the risk of row misalignment.
- 1. Organize Your Data: Import your dynamic database records into one sheet and maintain a separate 'Manual Notes' table in another.
- 2. Identify Unique Keys: Ensure both tables share a unique identifier column, such as a file number or record ID.
- 3. Apply Lookup Formulas: Use the XLOOKUP or VLOOKUP function in your main view to seamlessly pull notes from the manual table based on the unique ID.
- 4. Refresh with Confidence: Update your source data anytime; WPS Spreadsheet will instantly recalculate formulas to keep your manual notes perfectly attached to the right records.

Frequently Asked Questions
Why do my Excel notes shift when data refreshes?
When you type manual notes directly next to imported data, Excel links those notes to the row number (e.g., Row 5), not the actual data record. When a refresh inserts a new record at Row 3, the old data shifts down, but your manual notes stay stuck in their original row, causing a misalignment.
Can I use VLOOKUP instead of XLOOKUP to match my manual notes?
Yes. VLOOKUP works perfectly for this scenario as long as the unique identifier (like the File ID) is located in the very first column of your manual notes table.
How do I align notes if my SQL data doesn't have a unique ID?
If a single unique ID does not exist, you can create a 'composite key' by concatenating multiple columns that are unique when combined. For example, using a formula like =A2&B2 (combining Date and Customer Name) in both your SQL data and manual notes table can serve as an improvised unique identifier.
Will pivot tables keep my manual notes aligned automatically?
No. Just like standard tables, adding manual text columns directly adjacent to a Pivot Table will result in misalignment when the Pivot Table is refreshed or restructured. You must integrate the manual notes into the source data before generating the Pivot Table.




