Excel Auto Column Width: AutoFit Columns and Row Height – LicenceHouse guide

For Excel auto column width, double-click the right edge of the column header, or select the columns and go to Home > Cells > Format > AutoFit Column Width. For rows, double-click the bottom edge of the row number or choose AutoFit Row Height. Keyboard users can press Alt, H, O, I for columns and Alt, H, O, A for rows.

Task Mouse Ribbon (Home > Cells > Format) Keys
AutoFit columns Double-click the column boundary AutoFit Column Width Alt, H, O, I
AutoFit rows Double-click the row boundary AutoFit Row Height Alt, H, O, A
Exact column width Drag the boundary Column Width Alt, H, O, W
Exact row height Drag the boundary Row Height Alt, H, O, H
Default width for the sheet n/a Default Width Alt, H, O, D

How do I make Excel cells expand to fit text automatically?

Columns don't grow on their own as you type, but you can fit them in one action. Select the columns, or click the Select All triangle above row 1 for the whole sheet, then double-click any selected column boundary. Every selected column snaps to its longest entry.

Rows behave differently. If Wrap Text is on (Home > Alignment > Wrap Text) and you haven't set a fixed height, Excel grows the row automatically as you type longer text. That's the closest Excel gets to cells that expand automatically. Fix the column width you want, turn on Wrap Text, and let the rows adjust. Microsoft's guide to wrapping text in a cell notes that if wrapped text is still hidden, the row probably has a fixed height.

Here's a quick example. Column A holds product names and is 8.43 characters wide:

Cell Content After AutoFit Column Width
A2 Office 2024 Professional Plus Column widens to show the full name
A3 Windows 11 Pro Fits within the new width
A4 Visio 2024 Fits within the new width

To fit a column to just some of its cells, such as ignoring a long title in A1, select only A2:A4 and use Home > Cells > Format > AutoFit Column Width. The ribbon command fits the selected cells, while double-clicking the header fits the whole column.

How do I set column width in Excel?

To set an exact column width, select the columns, go to Home > Cells > Format > Column Width, type a number and select OK. You can also right-click a column letter and choose Column Width.

Excel size limits: default column width 8.43 characters, widths 0 to 255, default row height 15 points, heights 0 to 409 points.

The number is measured in characters: how many digits of the default font fit in the cell. The range is 0 to 255, and the standard default is 8.43. Microsoft's guide to changing column width and row height lists these limits. A width of 0 hides the column. If a column seems to have disappeared, see our guide to unhiding columns and rows.

To copy a width from one column to others, copy a cell in the source column, select the target columns, then use Home > Paste > Paste Special and choose Column widths.

How do I set Excel column width in inches?

Switch to Page Layout view, where Excel measures in inches, centimetres or millimetres instead of characters.

Steps to set Excel column width in inches: switch to View > Page Layout, select the columns, open Column Width, type 1.5 and return to Normal view.

  1. Go to View > Page Layout.
  2. Select the columns and choose Home > Cells > Format > Column Width.
  3. Type the width in inches, for example 1.5, and select OK.
  4. Return to View > Normal.

To use centimetres, go to File > Options > Advanced, and under Display change Ruler units. Page Layout view also shows rulers, so you can drag columns to a measured size. This is useful when a sheet has to print on labels or a pre-printed form. Our guide to setting the print area covers the rest of print setup.

Advanced nuance: because Normal view measures width in characters of the default font, the same workbook can look slightly different on another PC with a different default font or display scaling. Page Layout sizes are converted back into characters when you save. If an exact physical size matters, check it in Print Preview rather than trusting the number on screen.

What is the default row height in Excel?

Microsoft gives the default Excel row height as 15 points, with rows ranging from 0 to 409 points. The real default depends on the workbook's default font and size, because Excel sizes rows to fit that font. Larger fonts produce taller default rows.

To change the default row height for new rows in a workbook, change the font of the Normal style: Home > Cell Styles, right-click Normal, choose Modify > Format and set the font size. Rows that haven't been resized by hand adjust to match. To change the default font for all new workbooks, go to File > Options > General and set Font size under When creating new workbooks.

You can also select all cells and set Row Height to a number. That fixes the height on every row, though, so those rows stop growing when you wrap text.

Where is row height in Excel?

Row height is under Home > Cells > Format > Row Height, or right-click a row number and choose Row Height. Type a value in points and select OK. To check a row's current height without changing it, hover over the bottom edge of the row number and hold down the mouse button. A tooltip shows the height in points and pixels.

Why is Excel AutoFit row height not working?

When AutoFit row height doesn't work, the cause is almost always one of these:

Why Excel AutoFit row height fails: merged cells, Wrap Text off, a fixed height, extra line breaks or text beyond 409 points.

  • Merged cells. AutoFit ignores rows and columns that contain merged cells. Replace horizontal merges with Center Across Selection, as explained in our Center Across Selection guide, then AutoFit again.
  • Wrap Text is off. Without wrapping, the text stays on one line, so there's nothing for the row to grow into. Turn on Wrap Text first.
  • A fixed height was set. Once you drag a row or type a height, Excel stops adjusting it. Select the rows and choose AutoFit Row Height to return them to automatic.
  • Hidden line breaks or spaces. Extra Alt+Enter breaks at the end of a cell make the row taller than expected. Our guide to new lines in a cell shows how to find and remove them.
  • Very long text. A single row can't be taller than 409 points, so a very long paragraph will still be cut off.

What we commonly see: rows that fit on screen but cut off the last line when printed. Screen and printer measure fonts slightly differently. Add a little height after AutoFit, or leave a trailing Alt+Enter in the longest cells, then check Print Preview before you send the report.

Does AutoFit work the same on Mac and in all versions?

Yes. AutoFit, Column Width and Row Height work the same way in Excel 2016, 2019, 2021, 2024 and Microsoft 365. On a Mac, the commands are under Home > Format, and double-clicking boundaries works identically. The Alt key sequences are Windows only. No version adds automatic column widening as you type. Our comparison of Office versions covers the differences that do matter between releases, and the Office 2024 collection lists current editions.

Frequently asked questions

How do I AutoFit all columns at once?

Click the Select All triangle where the row and column headers meet, or press Ctrl+A twice inside a data range. Then double-click any column boundary. Every column fits its longest entry. Long titles in row 1 can make columns very wide, so select from row 2 down and use the ribbon command if you want to ignore them.

Why does my column show ##### instead of a number?

The column is too narrow to display the number or date in its current format. Unlike text, numbers can't spill into the next cell, so Excel shows hash marks. Double-click the column boundary to AutoFit it, or reduce the decimal places. A negative date or time also shows #####, whatever the width.

Can Excel AutoFit columns automatically when data changes?

Not with a built-in setting. Columns keep their width until you resize them. Rows with Wrap Text do adjust automatically. If you really need automatic widths, a short worksheet macro can run AutoFit whenever a cell changes, but it also clears the undo history each time it runs, which many people find frustrating.

How do I set the same width for several columns?

Select the columns by dragging across their letters, or Ctrl+click non-adjacent ones. Then drag any one boundary, or use Home > Cells > Format > Column Width and type a value. Every selected column takes the same width. The same method works for setting several rows to one height.

What is the maximum column width in Excel?

The maximum column width is 255 characters and the maximum row height is 409 points. If a cell holds more text than that space can show, turn on Wrap Text and widen the column, or move long notes to a separate cell, a comment or a linked document.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: Wrap text in a cell External Why wrapped text stays hidden and how to fix it
Microsoft Support: Change column width and row height External Official limits, units and defaults
Unhide columns and rows Internal Columns set to zero width
Set the print area Internal Print setup after sizing columns
Center Across Selection Internal Avoid merged cells that block AutoFit
New line in an Excel cell Internal Find stray line breaks
Office versions compared Internal Differences between Office releases
Office 2024 collection Internal Current Office editions
Page breaks in Excel Internal Control printed pages
Header and footer in Excel Internal Finish printed layouts
Excel keyboard shortcuts Internal More ribbon key sequences
Split a cell in Excel Internal Break long entries into columns
Excel, Excel tips, How-to