Fix XLOOKUP Not Expanding After Power Query Table Refresh
Question details
The user's XLOOKUP formula fails to dynamically include new rows of data added to a Power Query table after the table is refreshed.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Using an XLOOKUP formula to fetch data from a table that is periodically updated and expanded by a Power Query refresh.
- Observed behavior
- New rows loaded via Power Query refresh are ignored by the existing XLOOKUP formula, but deleting and re-entering the formula temporarily fixes the issue.
Ensure your spreadsheet calculation options are set to 'Automatic' rather than 'Manual', as manual settings prevent formulas from updating after external data refreshes.
Use Structured Table References Instead of Absolute Ranges
Switching from standard absolute ranges to structured table references ensures that your XLOOKUP formula automatically expands its lookup and return arrays when Power Query adds new rows.
When an XLOOKUP formula uses fixed cell ranges (e.g., $A$2:$A$100), it will not look beyond row 100 even if a Power Query refresh adds rows up to row 150. Structured references automatically bind to the table's column length.
Click on the cell containing your current XLOOKUP formula and press F2 or click into the Formula Bar to edit it.
Highlight the fixed lookup array (e.g., $A$2:$A$100) and click the header of the corresponding column in your Power Query table. The formula should update to look like 'TableName[ColumnName]'.
Repeat the previous step for the return array, ensuring it also points to the structured table column. Your final formula should resemble: =XLOOKUP(E2, Table1[EmployeeID], Table1[EmployeeName]).
Press Enter to save the formula. Right-click your Power Query table, select 'Refresh', and verify that the formula now includes newly added rows.

Modify Power Query External Data Properties
Adjust the external data properties of the Power Query table to ensure formulas adjacent to the table are updated and new rows are inserted correctly upon refresh.
Force Formula Recalculation
If structured references are already in use but the formula still hangs, manually force Excel to recalculate the workbook after the query completes.
Try WPS Office for Seamless Spreadsheet Management
If you frequently encounter formula updating issues, background refresh glitches, or complex troubleshooting in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible spreadsheet environment that handles dynamic arrays and XLOOKUP flawlessly without the heavy resource usage.

Frequently Asked Questions
Why does my XLOOKUP return #N/A after adding new rows to a table?
This typically happens if the XLOOKUP formula uses fixed cell ranges (like $A$1:$A$10) instead of structured table references. When new data is loaded via Power Query, the fixed range does not expand, causing the formula to miss the new rows.
How do I ensure my formulas automatically update when Power Query refreshes?
Navigate to the 'Formulas' tab on your ribbon, click 'Calculation Options', and verify that 'Automatic' is checked. If it is set to 'Manual', formulas will not evaluate the newly refreshed data until you press F9.
Can I use XLOOKUP securely with Power Query tables?
Yes, XLOOKUP works perfectly with tables generated by Power Query. To ensure stability, always reference the table's column names directly (e.g., Table_Name[Column_Name]) so the lookup and return arrays expand dynamically as the table grows.




