The AutoFit, Rotate Text Up guide
AutoFit makes a column exactly as wide as what its cells show: select the columns and press Alt, H, O, I, or double-click the border right of a column letter. When long headers sit over short numbers, turn the headers first with Home, Orientation, Rotate Text Up, and AutoFit shrinks the columns to the numbers.
Three ways to AutoFit
- The ribbon. Select the columns, then Home, Format (in the Cells group), AutoFit Column Width.
- The keyboard, on Windows. Press and let go of Alt, then H, O, I, one after the other. These are the ribbon's KeyTips, so they walk the same path: Home, Format, AutoFit.
- The mouse. Double-click the border to the right of a column letter. With several whole columns selected, double-clicking any of their borders fits all of them.
To select columns B to M, click the B column letter and Shift+click M, or click a cell in B, press Ctrl+Space and then Ctrl+Shift+Right.
AutoFit fits what you select
With whole columns selected, AutoFit looks at every cell in them. With a range selected, it looks only at those cells: select just the header row and the columns fit the headers, so numbers wider than that show ####. Select the columns by their letters to be sure.
Rotate long headers first
A monthly table is usually wider than it needs to be: "September" takes nine characters, the numbers under it three. Select the header row and pick Home, Orientation (the ab button with an arrow), Rotate Text Up. The headers read upwards and Excel makes row 1 taller. Then AutoFit the columns, and each one shrinks to its numbers.
The order matters. AutoFit measures the cells as they look at that moment, so if you AutoFit first and rotate second, the columns stay as wide as the month names. Run AutoFit again after rotating.
Common mistakes
- AutoFit before rotating. The columns keep the width of the longest header.
- Only the header cells selected. The columns fit the headers and the numbers show ####.
- Some columns left out. AutoFit only touches the columns you select.
- Dragging each border by eye. Slower, and the widths come out uneven.
AutoFit and rotation work in every version of Excel for Windows and Mac. On a Mac there are no KeyTips: double-click the border, or use AutoFit from the Format button on the Home tab. Rotated headers are formatting only; formulas and sorting work as before.
FAQ
- What is the shortcut for AutoFit column width in Excel?
- On Windows, select the columns and press Alt, then H, O, I, one key after the other. Double-clicking the border to the right of a column letter also AutoFits it.
- Why doesn't AutoFit make my columns narrower?
- Something in the column is wide, often a long header. Rotate the header (Home, Orientation, Rotate Text Up) and AutoFit again, or check for a long value further down.
- How do I AutoFit all columns at once?
- Select all the columns (Ctrl+A twice, or click the corner above row 1) and press Alt, H, O, I, or double-click any column border.
- How do I rotate header text in Excel?
- Select the header cells, then Home, Orientation, Rotate Text Up. Format Cells, Alignment, sets any angle.






































































