How to Refresh Excel External Data Without Overwriting Manual Changes
Question details
The user needs a method to refresh external data imported via Power Query without losing the custom columns and manually typed values added directly to the output table.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing data from external sources such as Power BI or other databases into Excel and supplementing it with manual data entry in adjacent columns.
- Observed behavior
- When the Power Query data connection is refreshed, Excel overwrites the entire table with the raw source data, erasing all manual changes and newly appended data.
Before proceeding, save a backup of your workbook and ensure your data table has a strict unique identifier (like a primary key or index column) to accurately match the fresh data with your manual inputs.
Create a Self-Referencing Query in Power Query
Use a self-referencing query to preserve manual additions by combining the fresh external source data with a separate table containing your manual changes.
By default, Power Query's refresh behavior is to entirely replace the destination table with the newly fetched data. To prevent your manual data from being wiped out, you can load your updated table back into Power Query (making it self-referencing) and merge it with the incoming external data.
Ensure your initial external data query pulls a unique ID column (such as CustomerID or an Index) into your Excel Table.
In Excel, type your custom headers next to the imported table and input your manual data. The Table will automatically expand to include these new columns.
Select any cell in your expanded table, navigate to the 'Data' tab, and click 'From Table/Range'. This creates a new query based on your manual inputs.
In the Power Query Editor, go to 'Merge Queries'. Select your original external data query as the primary table and your newly loaded self-referencing table as the secondary table. Use the unique ID column to join them.
Expand the merged column to reveal your manual data fields. Remove any duplicate columns, then click 'Close & Load' to output the combined data safely back into Excel.

Looking for a Simpler Way to Manage Spreadsheets? Try WPS Office
If navigating complex Microsoft Excel features like Power Query self-referencing tables feels overly complicated, consider switching to WPS Office. It provides a highly compatible, intuitive spreadsheet environment ideal for straightforward data management without the steep learning curve.
- 1. Download and Install: Get WPS Office for free from the official website and complete the lightweight installation in minutes.
- 2. Open Your Existing Files: Launch WPS Spreadsheets and open your existing .xlsx workbooks directly without any formatting loss.
- 3. Manage Your Data: Use WPS's built-in data tools to filter, sort, and analyze your data seamlessly without requiring complex background queries.

Frequently Asked Questions
Why does Power Query overwrite my manual Excel data?
Power Query is designed to serve as a one-way pipeline from the source to your spreadsheet. When a refresh is triggered, it essentially clears the destination table and repopulates it with the current snapshot of the raw data, deleting any custom text typed directly into those cells.
Can I lock specific cells to prevent Power Query from overwriting them?
No, Excel cell locking features do not prevent a Power Query refresh from regenerating the table structure. The refresh action overrides standard cell protection. A self-referencing query is the standard workaround.
What happens if I don't have a unique ID for my self-referencing query?
Without a unique identifier, Power Query cannot accurately match your manual data to the correct rows in the refreshed source data, especially if the source data is sorted differently or if new rows are added. You must create an index or a concatenated key.
Does a self-referencing query slow down Excel's performance?
It can marginally impact performance because the query engine has to fetch the external data, read the local table containing your manual edits, and process the merge operation. For exceptionally large datasets, this might cause longer refresh times, but it is typically negligible for everyday use.




