Keep Excel PivotTable Row Height and Formatting After Refresh
Question details
Keep PivotTable row heights, font sizes, and other cell formatting consistent after refreshing its source data.

- Product
- Microsoft Excel PivotTable
- Device & OS
- not provided
- Scenario
- The user formats a PivotTable and then refreshes it after data changes.
- Observed behavior
- Refreshing the PivotTable changes row heights and font sizes, even after formatting has been applied.
Open the worksheet containing the PivotTable and click any cell inside it before changing PivotTable options. If the PivotTable uses a macro, confirm that macros are enabled for the workbook.
Preserve PivotTable formatting in PivotTable Options
Use this setting when a refresh resets fonts, fills, borders, or column widths in an Excel PivotTable.
Excel can preserve formatting applied to PivotTable cells during updates. Disabling automatic column-width adjustment also helps prevent layout changes when refreshed values have different lengths.
Click any cell in the PivotTable, right-click it, and select PivotTable Options.
Open the Layout & Format tab, select Preserve cell formatting on update, and then click OK.
In PivotTable Options > Layout & Format, clear Autofit column widths on update, then click OK.
Select the PivotTable rows that need a fixed height, go to Home > Format > Row Height, enter the required value, and refresh the PivotTable to test the result.

Run a VBA macro to restore PivotTable row height and font size
Use this method when PivotTable Options alone does not retain a specific row height or font size after the PivotTable refreshes.
Manage PivotTable Reports with WPS Spreadsheet
If Excel PivotTable refresh behavior continues to disrupt your report layout, try WPS Office as a free, lightweight alternative. WPS Spreadsheet provides a familiar worksheet interface, supports common spreadsheet workflows, and makes it easy to open and continue working with existing Excel files.

Frequently Asked Questions
Where is Preserve cell formatting on update in Excel?
Click inside the PivotTable, right-click, choose PivotTable Options, and open the Layout & Format tab. Select Preserve cell formatting on update and click OK.
Why does a PivotTable change my row height after I refresh it?
A refresh can rebuild parts of the PivotTable and adjust its layout based on updated fields or values. Set a manual row height through Home > Format > Row Height, and enable Preserve cell formatting on update.
Will disabling Autofit column widths on update preserve row heights too?
No. That option controls column widths, not row heights. However, it prevents columns from resizing during a refresh and helps keep the overall report layout stable.
Can I automatically restore PivotTable formatting after every refresh?
Yes. Use a VBA macro that sets the PivotTable row height and font size after refreshing. Save the file as .xlsm, then run the macro after each refresh or connect it to a workbook event if you use VBA automation.




