How to Not Autofit in Excel: Stop Columns Resizing
In this article
To stop Excel from autofitting, you need to understand that Excel does not have a single global switch that turns autofit off. Instead, autofit happens in three main situations: when you double-click a column or row border, when you use the AutoFit command from the ribbon or menu, and when Excel automatically adjusts row height to fit wrapped text or a larger font. To prevent autofit, avoid the double-click and AutoFit commands, and for automatic row height, set a fixed row height or turn off text wrapping. This guide walks you through each method so you can keep your columns and rows exactly the size you want.
What You'll Need
- Microsoft Excel installed on your computer (Windows or Mac). The steps below refer to the desktop version; the web version has fewer options.
- A spreadsheet open where you want to control column widths and row heights.
Step-by-Step
- Understand where autofit comes from. Excel does not autofit columns automatically when you type. Columns only resize when you double-click the boundary between column headers, or when you use the AutoFit Column Width command. Rows, however, can resize automatically when you wrap text or change the font size. So the first step is to know which behavior you want to stop.
- Avoid double-clicking column borders. The most common cause of unwanted autofit is accidentally double-clicking the line between two column letters (for example, between A and B). A single click selects the column; a double-click triggers AutoFit. To resize manually, click and drag the border instead. If you tend to double-click by mistake, you can also resize columns using the ribbon: go to Home > Format > Column Width and type a specific number.
- Do not use the AutoFit commands. On the Home tab, in the Cells group, click Format. Under Cell Size, you will see AutoFit Column Width and AutoFit Row Height. Avoid these options if you want to keep your current sizes. The same commands appear when you right-click a column or row header. Note that menu labels can differ slightly by Excel version and platform.
- Set a fixed row height to stop automatic row resizing. If Excel keeps making rows taller when you type long text, it is because the row height is set to auto (the default). To fix a row height: select the rows you want to control, then go to Home > Format > Row Height, type a number (for example, 15), and click OK. Now the row will not grow automatically, even if text is wrapped or the font is larger.
- Turn off Wrap Text if you do not need it. Wrapped text is a common trigger for automatic row height changes. Select the cells, then on the Home tab, in the Alignment group, click Wrap Text to turn it off. Without wrapping, long text will overflow into adjacent empty cells or be cut off, but the row height will stay fixed.
- Lock column widths by protecting the sheet (optional). If you want to prevent yourself or others from accidentally resizing columns, you can protect the worksheet. First, unlock any cells that should remain editable: select them, press Ctrl+1 (or Command+1 on Mac), go to the Protection tab, and clear the Locked checkbox. Then go to Review > Protect Sheet, set a password if you like, and make sure the option to format columns and rows is not allowed. Be aware that protection can block other edits too, so use it only when needed.
- Use a table style that does not autofit. Excel tables (created with Insert > Table) can behave differently: when you type in a cell, the column may widen automatically if the cell is not set to wrap. To stop this, turn off Wrap Text for the table column, or convert the table back to a normal range (Table Design > Convert to Range). Converting removes table features but gives you full manual control.
- Check for macros or add-ins that resize columns. If columns resize without you doing anything, a macro or add-in might be running AutoFit. To check, open the Developer tab (if not visible, enable it in File > Options > Customize Ribbon) and look at the macros. Also review any add-ins under File > Options > Add-ins. Disable suspicious add-ins and test again.
Common Mistakes
- Double-clicking instead of single-clicking. Many people accidentally double-click the column border when trying to select a column. Practice clicking once in the column header letter instead.
- Confusing row height with column width. Autofit for columns and rows are separate commands. Setting a fixed row height does not stop columns from autofitting, and vice versa.
- Forgetting that wrapped text forces row height changes. Even with a fixed row height, if you later turn on Wrap Text, Excel may override your setting. Keep wrapping off if you need fixed heights.
- Assuming sheet protection prevents all resizing. Protection only works if you specifically disallow formatting columns and rows. By default, many protection options are enabled, so check the settings carefully.
- Overlooking merged cells. Merged cells can behave unpredictably with autofit. If you have merged cells, unmerge them before setting fixed sizes.
Tips
- Use the Format Painter to copy column widths and row heights from one area to another instead of autofitting.
- To set multiple columns to the same width, select them all, then drag one border or use Format > Column Width.
- If you frequently need specific sizes, create a template with your preferred column widths and row heights already set.
- Remember that the web version of Excel has limited formatting options; for full control, use the desktop app.
- When pasting data, use Paste Special > Values to avoid bringing in formatting that might trigger resizing.
Troubleshooting
If columns or rows still resize unexpectedly, work through these checks in order:
- Restart Excel. Close and reopen the application to clear any temporary glitches.
- Check for stuck keys. A stuck Ctrl or Shift key can cause odd behavior. Press each key a few times to release it.
- Test in a new workbook. Create a blank workbook and see if the problem persists. If it does not, the issue is with your original file—possibly a macro or corrupted formatting.
- Review macros. Open the Developer tab and check for any macros that run on cell change or workbook open. Disable them temporarily to test.
- Disable add-ins. Go to File > Options > Add-ins, manage Excel Add-ins, and clear all checkboxes. Restart Excel and test. Re-enable one at a time to find the culprit.
- Reset Excel options. As a last resort, you can reset Excel to default settings, but note this will clear your customizations. Back up your files first.
If none of these work, consider that the file may be corrupted. Try opening it in Excel Online or using the Open and Repair option (File > Open > Browse, select the file, click the arrow next to Open, and choose Open and Repair).
Frequently Asked Questions
Can I turn off autofit globally in Excel?
No, Excel does not have a global autofit off switch. You must avoid the autofit commands and set fixed row heights where needed.
Why do my rows keep getting taller when I type?
This happens because the row height is set to auto and the cell has Wrap Text enabled or the font size is larger than the row height. Set a fixed row height and turn off wrapping.
Does protecting a sheet stop autofit?
Only if you disallow formatting columns and rows in the Protect Sheet options. By default, some formatting is still allowed.
How do I resize a column without triggering autofit?
Click and drag the column border, or use Home > Format > Column Width and type a number. Do not double-click the border.
Will autofit happen when I paste data?
Pasting can bring in formatting that changes column widths if the source cells had different widths. Use Paste Special > Values to avoid this.
Can I stop Excel from autofitting when I open a file?
Excel does not autofit on open by default. If it happens, a macro or add-in is likely responsible. Check for macros and disable add-ins.