Power Query Problems

Fix Excel Cell References That Show #REF! After a Power Query Refresh

Khadija KhanKhadija Khan Nov 25, 2026 870 views

Question details

The user needs Excel formulas to remain valid when refreshed Power Query output changes the number of rows.

Fix Excel Cell References That Show #REF! After a Power Query Refresh
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
Worksheet formulas reference cells in a table populated by a Power Query refresh.
Observed behavior
After a refresh changes the output size, formulas that refer to deleted or replaced query rows may display #REF!.
Before you start

Identify the formulas showing #REF! and the query output they referenced. Check whether the query is loaded as an Excel table and whether its column names remain consistent after refresh.

Solution 1Recommended

Use structured references to the Power Query output table

Use table and column names instead of references to individual rows that may disappear during refresh.

1
Find the table name

Select a cell in the query output, open the Table Design tab, and check the Table Name field.

2
Replace the broken reference

Edit the formula in the formula bar to reference the table and column. For example, use =SUM(QueryTable[Amount]), replacing QueryTable and Amount with your actual table and column names.

3
Refresh and check

Open Data > Queries & Connections, right-click the query, and select Refresh. Check that the revised formula returns the expected result.

Use structured references to the Power Query output table
Keep column names stable: Structured references depend on the table and column names. If the query removes or renames a referenced column, update the formula or query.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and Excel format compatibility, making it easy to move everyday spreadsheet work to WPS. It does not repair Microsoft Excel Power Query refresh behavior.

Review and edit spreadsheet formulas in WPS SpreadsheetsOpen and save common Microsoft Excel formats, including XLSXUse a familiar interface for a smoother transition from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does a Power Query refresh cause #REF! errors?

A refresh can change the number of output rows. If a formula refers to a cell in a row that is deleted or replaced, Excel may turn that reference into #REF!.

How do I find the name of my query output table?

Select a cell in the output table and open the Table Design tab. The table name appears in the Table Name field.

Will a structured reference find the same record after rows move?

A table reference can follow a named column as the table changes size, but it does not by itself identify a particular record. Use a lookup based on a stable unique ID when you need a specific record.

Can Excel automatically restore a reference that already shows #REF!?

The original reference may no longer be recoverable from the formula. Select the affected cell and edit the formula bar to replace #REF! with the intended table reference or a valid cell reference.