Excel AutoFit: How to Auto Size Cells
In this article
Excel does not have a single "auto size everything" button, but you can auto size cells in a few seconds: select the rows or columns you want to resize, then double-click any boundary line between two column headers or row numbers, and Excel fits each selected column or row to its content. For text that wraps across multiple lines, use Home > Format > AutoFit Column Width or AutoFit Row Height after turning on Wrap Text. The steps below cover the double-click method, the ribbon method, whole-sheet sizing, and the fixes for the cases where AutoFit refuses to work.
What You'll Need
- Excel for Windows, Excel for Mac, Excel on the web, or the Excel mobile app (labels vary slightly by version, platform and region).
- A worksheet with data in it — AutoFit needs content to measure against.
- Optional: Wrap Text enabled if you want tall cells rather than very wide ones.
Step-by-Step
- Select what you want to resize. Click a column letter (for example C) to select the whole column, or drag across several column letters to select a range. To select every column on the sheet, click the small square at the top-left corner where the row numbers and column letters meet. For rows, click the row number instead.
- Find the boundary line. Hover the pointer over the vertical line between two column headers, such as the line between C and D. The pointer changes to a double-headed arrow. For rows, hover over the horizontal line between two row numbers.
- Double-click the boundary. Excel measures the widest entry in each selected column and resizes the column to fit it. If you selected several columns, every one of them is sized independently. This is the fastest method and works for rows the same way.
- Or use the ribbon. With the columns still selected, go to Home and find the Format button in the Cells group. Choose AutoFit Column Width or AutoFit Row Height. On Excel for Mac the same commands live under the Format menu. On Excel on the web, the Format option appears in the Home tab's Cells group.
- AutoFit the whole sheet at once. Click the select-all square at the top-left corner, then double-click any column boundary, or use Home > Format > AutoFit Column Width. Repeat with a row boundary for row heights. Everything on the sheet resizes in one action.
- Handle long text with Wrap Text. If a cell contains a long sentence, AutoFit Column Width will make the column extremely wide. Select the cells, click Wrap Text on the Home tab, then use Home > Format > AutoFit Row Height so the row grows downward instead of the column growing sideways.
- Check the result and adjust manually if needed. Drag a boundary line to fine-tune a width. To set an exact value, right-click the column header, choose Column Width, type a number and confirm. Row height works the same way through Row Height.
Common Mistakes
- Double-clicking the wrong spot. The pointer must be on the header boundary line, not inside the header itself. If you see a normal arrow, you are in the wrong place.
- Expecting AutoFit to shrink a column. AutoFit sets the width to fit the widest entry, so it can make a column narrower than before, but it will not go below the width needed by the longest value. If a column stays wide, something in it is long — often a stray space or a formula result.
- Forgetting merged cells. AutoFit does not work reliably on merged cells. Unmerge them, size the columns, then merge again if you must.
- Wrapping text without resizing rows. Turning on Wrap Text alone hides content behind the row height. Follow it with AutoFit Row Height.
- Assuming manual row heights will update. If a row height was set by hand, AutoFit Row Height resets it, but a later edit to the text will not re-trigger it — you must run AutoFit again.
Tips
- Double-click a column boundary while only one cell in that column is selected to fit just that column — no need to select the whole column first.
- To make every column the same width, select them all, right-click a header, choose Column Width and enter one value.
- Use Wrap Text plus AutoFit Row Height for address fields, notes and descriptions; use plain AutoFit Column Width for short labels and numbers.
- If a column looks too wide, check for a single long entry at the bottom of the data — sorting by length or scanning with Ctrl+End (Command+End on Mac) finds it quickly.
- Freeze the header row before resizing a large sheet so you can still see your labels while you work.
Troubleshooting
Nothing happens when you double-click. Make sure the workbook is not protected and the sheet is not locked. Review > Unprotect Sheet removes protection if you have the password. Also confirm you are on the boundary line, not the header text.
AutoFit makes a column enormous. A long text entry or a formula returning a long string is the cause. Turn on Wrap Text, then AutoFit Row Height instead, or shorten the content.
Row heights will not change. Merged cells in the row block AutoFit. Unmerge, resize, then merge again. If the row still refuses, check that the row height is not set to a fixed value via Format > Row Height.
Text is cut off after resizing. Wrapped text needs a taller row; run AutoFit Row Height. If the cell has a fixed row height set manually, choose AutoFit Row Height to clear it.
AutoFit is greyed out. The sheet is probably protected, or you are in a view that does not allow resizing. Unprotect the sheet and try again.
On mobile. The Excel app has limited resizing controls. Tap a column header, then use the resize handle that appears, or open the file on a computer for full AutoFit options.
Frequently Asked Questions
Does Excel have one button that auto sizes everything?
Not a single dedicated button, but selecting the whole sheet with the top-left corner square and then using Home > Format > AutoFit Column Width resizes every column at once. Repeat with a row boundary for row heights.
Why does AutoFit not shrink my column?
AutoFit sizes to the widest entry, so if the column stays wide, a cell in it contains a long value — often a formula result, a trailing space or a merged cell. Find and shorten that entry.
Does AutoFit work on merged cells?
No, not reliably. Unmerge the cells, run AutoFit, then merge again if needed.
Will AutoFit update automatically when I type longer text?
No. AutoFit is a one-time action. If you edit content afterward, run it again, or set Wrap Text and AutoFit Row Height so the row grows with the text.
Can I auto size only one column?
Yes. Click any cell in that column and double-click the boundary on its right side in the header row. Only that column resizes.
Is AutoFit available in Excel on the web and mobile?
Excel on the web includes AutoFit Column Width under Home > Format. The mobile app has more limited resizing, usually through a drag handle on the column header, so use a desktop or web version for full control.