To stop a PivotTable from changing column widths after each refresh, select it, open PivotTable Analyze > Options, choose Layout & Format, and clear Autofit column widths on update. For ordinary worksheet cells, Excel has no single global AutoFit switch: set the column widths or row heights you want, and avoid running an AutoFit command. The right method depends on what is changing, so first identify whether you are working with a PivotTable, regular cells, or a row that grows to show wrapped text.
What You’ll Need
- Excel for Microsoft 365 on Windows, or access to the workbook in the Excel desktop app if you are using Excel for the web.
- Permission to edit the worksheet. If a sheet is protected, you may need its password or the owner’s help to change row heights or column widths.
- A moment to identify what is resizing: PivotTable columns after refresh, ordinary columns after a command or paste, or row heights when text wraps. These are different behaviors and do not share one on/off setting.
Step-by-Step
- Identify what AutoFit is changing. If a PivotTable’s columns widen or narrow whenever you refresh it, use the PivotTable setting in step 2. If a normal worksheet column changes after you enter data, paste, or run a macro, use the fixed-width approach in steps 3 and 4. If a row becomes taller to display wrapped text, use step 5. Excel does not normally resize ordinary columns automatically just because you type longer text into a cell; long text may instead overflow into empty cells beside it or appear cut off.
- Turn off resizing on PivotTable refresh. Click any cell inside the PivotTable. On the ribbon, select PivotTable Analyze > Options. In the PivotTable Options dialog, open Layout & Format, clear Autofit column widths on update, and select OK. You can also right-click inside the PivotTable and choose PivotTable Options, then open the same tab and clear the same checkbox. Refresh the PivotTable to check that the current widths stay in place. This setting controls column widths during PivotTable updates; it does not freeze worksheet rows or stop other commands from resizing cells.
- Set the column width you want for ordinary data. Select the column or columns by clicking their letter headings. To set a precise size, choose Home > Format > Column Width, enter a value, and select OK. The value uses Excel’s column-width units, based roughly on the width of characters in the default font, rather than inches or pixels. You can select several columns first and give them the same width. For a visual adjustment, drag the boundary between two column headings instead. Do not double-click that boundary: double-clicking applies AutoFit to the column on its left.
- Check for actions that reapply AutoFit. A fixed width can still be changed later if someone selects Home > Format > AutoFit Column Width, double-clicks a column boundary, or runs a macro or add-in that resizes columns. Avoid those actions if the width must remain consistent. If a pasted range changes the layout, use Undo immediately if appropriate, then inspect the column boundaries and set the widths again. Pasting values alone and pasting whole cells can affect formatting differently, so check the paste options you chose.
- Set a fixed row height when wrapped text is making rows taller. Select the affected row or rows, then choose Home > Format > Row Height. Enter a height and select OK. If you want text to continue on multiple lines within that fixed space, use Home > Wrap Text, but understand that some lines may not be visible if the row is too short. Increase the height enough to show the text, or widen the column to reduce wrapping. Choosing Home > Format > AutoFit Row Height reverses the fixed-height approach by fitting rows to their contents.
- Save and verify the layout. Save the workbook, then repeat the action that used to resize the cells: refresh the PivotTable, edit a sample value, or reopen the sheet. Confirm that the intended widths and heights remain. If only one sheet should have a particular layout, make the change there rather than selecting every worksheet. If multiple worksheets are selected, a width or height change can apply to all of them.
Mac and web notes: In Excel for Mac, select the PivotTable and look for the PivotTable options on the PivotTable Analyze tab, or use the right-click menu. The labels and dialog layout can vary slightly by release, but look for the checkbox named Autofit column widths on update under layout and formatting options. Excel for the web may not expose every PivotTable option. If you cannot find that checkbox, open the workbook in the desktop app, change the option there, and save. The standard Home > Format commands for setting column width and row height are available in desktop Excel; ribbon placement can vary somewhat by platform.
Common Mistakes
- Looking for a master AutoFit toggle. There is no general Excel setting that disables all AutoFit behavior across every worksheet. The PivotTable checkbox is specific to PivotTable refreshes. Regular cells need their dimensions set, and any command or automation that applies AutoFit can change them again.
- Confusing text overflow with resizing. When a cell contains text, Excel may show it across adjacent blank cells. That visual overflow does not mean the column got wider. If the adjacent cell contains data, the text may look clipped. Widen the column, wrap the text, or adjust alignment rather than assuming AutoFit is running.
- Using AutoFit to solve a layout problem. AutoFit chooses a size based on cell contents, which can make a report uneven or extremely wide because of one long entry. Use a measured width or height for a consistent layout instead.
- Setting a row too short for wrapped text. A fixed row height can hide part of the contents. The text is still in the cell, but not all lines are displayed. Give the row more height or widen the column; do not rely on a narrow fixed height when every line must be visible.
- Changing widths while multiple sheets are grouped. If several sheet tabs are selected, Excel may apply the size change across all selected sheets. Check that only the intended worksheet is active before adjusting dimensions.
Tips
- Use consistent widths for reports. Select the relevant columns together and use Home > Format > Column Width to give them the same value. This is often more readable than AutoFit when a table is printed or shared.
- Keep labels visible without making every column huge. Try Home > Wrap Text for headings, then choose a sensible column width and row height. You can also shorten a heading or use an abbreviation, provided its meaning remains clear to readers.
- Check print layout separately. Fixed worksheet dimensions do not guarantee a good printed page. Use Page Layout > Scale to Fit settings carefully and preview the printout; scaling affects how the sheet is printed, not the underlying column widths.
- For recurring PivotTable refreshes, set the option before sharing. Save the workbook after clearing Autofit column widths on update. This reduces the chance that a future refresh will undo the intended report layout.
- Look for automation if widths keep changing. A workbook macro, add-in, or external process may be applying widths each time data changes. If the change happens repeatedly without a manual AutoFit action, ask the workbook owner or administrator whether automation is involved.
Troubleshooting
The PivotTable still changes width after refresh. Confirm that you changed the option for the correct PivotTable; a workbook can contain several, each with its own settings. Click inside the one that changes, reopen its options, and verify that Autofit column widths on update is cleared. Save the workbook after changing it. If you are using Excel for the web and cannot see the setting, open the file in desktop Excel.
A regular column keeps widening. Excel does not have an ordinary-cell setting that automatically fits every column as you type, so look for a repeated action. Check whether someone is double-clicking the column boundary, choosing AutoFit Column Width, refreshing a related PivotTable, or using a macro or add-in. Set the width again through Home > Format > Column Width after identifying the cause.
The row height does not stay fixed. Re-enter the desired value through Home > Format > Row Height and check whether a later action is applying AutoFit Row Height. If the worksheet is protected, the command may be unavailable until the sheet is unprotected. If wrapped text appears incomplete, the fixed height may simply be too small to display all lines.
The width or height command is unavailable. Check whether the sheet is protected or whether the workbook is in a restricted editing state. Ask the owner for permission or an unprotected copy rather than trying to bypass protection. Also make sure you selected the column or row headings, or the intended cells, before opening the formatting command.
Frequently Asked Questions
Can I disable AutoFit for the entire Excel workbook?
No. Excel has no workbook-wide switch for all AutoFit behavior. You can disable automatic width changes on update for an individual PivotTable, and set fixed sizes for ordinary worksheet rows and columns.
Will clearing the PivotTable option stop the table from refreshing?
No. It only stops the PivotTable from automatically adjusting column widths during an update. The refresh can still update the PivotTable’s displayed data according to its source and settings.
Does a fixed column width stop text from changing?
No. The cell value remains editable. A fixed width only controls the column’s size; long text may overflow into empty cells, wrap onto extra lines if wrapping is enabled, or appear clipped.
Can I keep text wrapped and prevent row height from changing?
Yes. Set a specific row height and use Wrap Text if needed. However, if the fixed row is not tall enough, some wrapped lines will be hidden. Adjust the row height or column width to show the content.
Does this work in Excel for the web?
You can set many regular row heights and column widths in Excel for the web, but some PivotTable options may be missing. For the Autofit column widths on update checkbox, use desktop Excel if it is not available in your browser.
Will changing a column width affect other worksheets?
Usually it affects the active sheet only. If several sheet tabs are grouped or selected, the change can apply to all of them. Check the selected tabs before changing widths or heights.
Related
- How to Delete Duplicate Names in Excel Without Losing Data
- How to Delete Duplicate Data in Excel
- How to Delete Duplicate Entries in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Project Tracker Spreadsheet in Google Sheets: Setup GuideYes. You can make a project tracker spreadsheet in Google Sheets by creating a sheet with one row…
- Excel Alt+H,O,I: AutoFit Column Width Shortcut GuideIn Excel for Microsoft 365 on Windows, Alt, H, O, I runs AutoFit Column Width for the selected…
- How to Insert a Row in Excel Without a Mouse: ShortcutsTo insert a row in Excel without a mouse, move to a cell in the row that should…
- Contact Number List Template for Excel: Setup GuideA contact number list template for Excel is a simple table with one row per person and separate…
- Excel Indian Number Format: Switch to US Number GroupingTo change Indian number grouping to US-style commas in Excel for Microsoft 365 on Windows, select the cells,…
- Add Page Numbers in Microsoft Word 365To add page numbers in Word 365 on Windows, open the document, select Insert > Page Number, choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.