How to AutoFit Column Width and Row Height in Excel

Text chopped off at the edge of a cell, numbers replaced with #####, and columns far wider than they need to be are all fixed by AutoFit. It resizes columns and rows to fit exactly what's in them.
The quickest way: double-click
1. Move your pointer to the right-hand edge of a column letter at the top of the sheet, for example the line between B and C.
2. When the pointer changes to a double-headed arrow ↔, double-click.
2. When the pointer changes to a double-headed arrow ↔, double-click.
Column B resizes to fit its longest entry.
AutoFit several columns at once
1. Select the column letters you want to resize (drag across them, or hold Ctrl and click).
2. Double-click the edge of any one of the selected columns.
2. Double-click the edge of any one of the selected columns.
Every selected column fits its own content.
AutoFit the whole sheet
1. Press Ctrl + A (or click the triangle in the top-left corner of the sheet).
2. Double-click the border between any two column letters.
3. Double-click the border between any two row numbers to fit the heights too.
2. Double-click the border between any two column letters.
3. Double-click the border between any two row numbers to fit the heights too.
Use the menu
1. Select the columns.
2. Go to Home > Format.
3. Choose AutoFit Column Width (or AutoFit Row Height).
2. Go to Home > Format.
3. Choose AutoFit Column Width (or AutoFit Row Height).
Keyboard shortcuts
Select the columns, then press these keys one after another (not all at once):
• Alt, H, O, I: AutoFit column width
• Alt, H, O, A: AutoFit row height
• Alt, H, O, A: AutoFit row height
Fit to just part of a column
Double-clicking the border fits the longest entry in the whole column, including headings and titles. If a long title in row 1 makes the column huge:
1. Select only the cells you want to fit, for example A3:A200, not the whole column.
2. Use Home > Format > AutoFit Column Width.
2. Use Home > Format > AutoFit Column Width.
The menu option only looks at the selected cells.
Set an exact width instead
If you want all columns the same width:
1. Select the columns.
2. Right-click a column letter and choose Column Width.
3. Type a number (the default is 8.43) and click OK.
2. Right-click a column letter and choose Column Width.
3. Type a number (the default is 8.43) and click OK.
To copy widths from another sheet, copy the original columns, then use Paste Special > Column widths.
AutoFit for rows with wrapped text
Rows normally grow automatically when you turn on Wrap Text. If a row doesn't, double-click the bottom border of the row number to fit it.
Troubleshooting
AutoFit doesn't make a row taller. The row contains merged cells. Excel can't auto-fit rows with merged cells, so drag the row height manually, or use Center Across Selection instead of merging.
The column is still showing #####. The number might be a negative date or time, which Excel can't display. Check the value.
The column got much too wide. A cell further down has long text, or a title is spilling in. Use the "fit to part of a column" method above.
Row heights reset every time. Rows you've dragged manually stop auto-fitting. Use AutoFit Row Height to switch them back to automatic.
Wrapping up
Double-click the border between column letters to fit one column. Select everything with Ctrl + A and double-click once to fit them all. Select just the data cells and use the menu when a long title gets in the way.
