Excel Cell Auto Adjust: How to Fit Width and Row Height

How-to basics · Updated November 2, 2026

Excel Cell Auto Adjust: How to Fit Width and Row Height

To auto-adjust cells in Excel for Microsoft 365 on Windows, select the column or row, then double-click the boundary on its header; Excel fits the width or height to the contents. You can also use Home > Format > AutoFit Column Width or AutoFit Row Height. AutoFit changes sizing, not the cell’s contents or formatting.

What AutoFit does in Excel

AutoFit is Excel’s way of sizing a column or row to show the content in its cells as fully as possible. For a column, Excel looks at the displayed contents in the selected column and sets a width that can accommodate the widest relevant entry. For a row, it adjusts the height to fit the content, taking features such as wrapped text into account.

It is not a general-purpose page layout tool. AutoFit does not make every column the same width, shrink text to fit, or guarantee that a sheet will print on one page. It changes a column’s width or a row’s height; it does not resize individual cells independently of the other cells in that column or row.

The content Excel evaluates includes displayed results. For example, if a cell contains a formula that returns a long name, AutoFit responds to the returned name rather than the formula text. Number formats also matter because a formatted date or currency amount may take more space than the underlying value.

AutoFit a column width

The quickest method is to use the column headers at the top of the worksheet. Select one column by clicking its letter, or select several adjacent columns by dragging across their letters. To select nonadjacent columns, hold Ctrl while clicking each column letter. Then double-click the dividing line on the right edge of one of the selected column headers. Excel applies a suitable width to each selected column.

For a ribbon command, select the column or columns and choose Home > Format > AutoFit Column Width. This option is useful when a precise double-click is awkward, or when you want to use the keyboard: on Windows, press Alt, then H, then O, then I in sequence to open the AutoFit Column Width command. These are ribbon access keys, not a simultaneous key combination.

For example, if column B contains product names and column C contains prices, selecting B and using AutoFit changes only the width of B. It does not make C wider just because a neighboring entry is long. If you select both columns, Excel determines an appropriate width for each one separately.

AutoFit a row height

To fit a row, click its number on the left, then double-click the lower boundary of the row header. For multiple rows, select their row numbers first; Excel adjusts the selected rows to their contents. You can also choose Home > Format > AutoFit Row Height. The Windows ribbon access keys are Alt, H, O, A, pressed in sequence.

Row AutoFit is especially useful when a cell contains multiple lines or when text is set to wrap. If a row contains a short value in one cell and several wrapped lines in another, the row must be tall enough for the tallest cell. Excel increases the shared row height so the wrapped text can be displayed.

AutoFit can also reduce a row that was made taller by dragging, if the content no longer needs the extra space. To fit all rows, select the worksheet rows you want to change before using the command. You can select a block of rows by dragging over their row numbers, or use the worksheet’s Select All button at the top-left corner of the grid to select the whole sheet.

Choosing between AutoFit and fixed sizing

AutoFit is a good choice when the aim is to reveal current contents quickly. It works well for a fresh data export, a list of names, or a report whose text varies in length. Fixed sizing is often better when the sheet needs a consistent visual layout, when columns must align across worksheets, or when the file will be read on different screens.

A very long entry can make AutoFit produce an extremely wide column. That may technically show the content, but it can make the rest of the worksheet difficult to read. Consider wrapping the text, widening the column to a sensible limit, or using a note or a separate detail column instead. For a numeric report, a fixed width can also make values easier to compare at a glance.

To set a fixed width, select the column and choose Home > Format > Column Width, then enter a value. For a fixed row height, use Home > Format > Row Height. These commands let you choose a consistent size rather than letting the current contents determine it. If content later changes, run AutoFit again or retain the fixed layout and adjust it manually.

Wrap Text, merged cells, and line breaks

Wrap Text places long text on multiple lines within a column instead of making the column as wide as the longest entry. Select the cells and choose Home > Wrap Text. Then use AutoFit Row Height if the rows do not expand enough to show the wrapped lines. A narrower column with wrapped text can be more practical for notes, addresses, or descriptions than an exceptionally wide column.

AutoFit has a notable limitation with merged cells. A merged area spans multiple rows or columns, so Excel cannot always calculate a suitable individual row height or column width from that cell’s content. If text in a merged cell is clipped, try unmerging the cells and using a layout that does not depend on a merge, or set the row height and column widths manually. In some layouts, measuring the text in an unmerged cell and adjusting the relevant dimensions is the simplest workaround.

You can insert a deliberate line break while editing a cell to control where text wraps. On Windows, press Alt+Enter at the insertion point in the cell. Then enable Wrap Text and fit the row height. A manual break can make a heading or address easier to read, but it may mean that the row needs more vertical space than AutoFit would otherwise use.

Why AutoFit may not show all the content

If text still appears clipped after AutoFit, check the conditions below before repeatedly resizing the same column. The issue may be the cell layout or another setting rather than a failed command.

  • Wrap Text is off: Long text may remain on one line and extend into adjacent empty cells, or be cut off when the neighboring cell contains data. Turn on Wrap Text if the text should occupy multiple lines.
  • The cell is merged: AutoFit may not calculate the merged area as expected. Try unmerging it or set the dimensions manually.
  • The row or column is hidden: A hidden row or column will not appear simply because you AutoFit other cells. Unhide it first by selecting the surrounding headers, right-clicking, and choosing Unhide.
  • The worksheet is protected: Protection can prevent changes to row heights or column widths, depending on the protection settings. If you have permission, review the sheet protection before resizing.
  • The displayed value needs more room: A narrow cell can show hash marks for some numbers or dates. AutoFit the column, or adjust the number format if a different display is appropriate.
  • The row height was set manually: Re-run AutoFit Row Height after changing the cell content or enabling Wrap Text. If the row still looks wrong, select the affected rows and apply the command again.

Also check whether the content is actually in the cell you expect. A formula may return an empty string, a number format may hide part of a value, or text may be overflowing into a neighboring blank cell. Changing a column width cannot correct an incorrect formula or display format.

AutoFit, double-clicking, and other ways to resize

Double-clicking a header boundary and choosing an AutoFit command are two ways to request the same kind of sizing. Dragging a boundary is different: it sets a size based on where you release the pointer, not on the contents. The drag method is useful when you want a particular appearance rather than the exact fit Excel calculates.

You can also make multiple columns the same width. Select them, choose Home > Format > Column Width, and enter one width for all selected columns. That is not AutoFit: each column receives the same fixed width, even if the contents differ. Similarly, entering a row height gives selected rows one consistent height, which may clip wrapped text if the value is too small.

AutoFit is also different from shrinking text to fit. Excel’s Shrink to Fit alignment option reduces the displayed font size inside a cell when the column is too narrow; AutoFit instead changes the column width. Shrink to Fit can preserve a compact layout, but the resulting text may be harder to read, and it does not make a wrapped paragraph taller.

Excel for Mac and Excel for the web

In Excel for Mac, the column-header or row-header boundary method is also available. Ribbon layouts and access-key behavior differ from Windows, so use the Home tab’s Format menu and its AutoFit options if the Windows keyboard sequence does not apply. On Mac, keyboard shortcuts can depend on the keyboard and Excel version; the header-boundary method avoids relying on a Windows ribbon shortcut.

Excel for the web provides column and row resizing in the worksheet grid, including adjusting a boundary to fit contents. Its ribbon layout can differ slightly from the desktop app, and some workbook features are not managed identically online. If a merged-cell layout or protected worksheet prevents a reliable adjustment, open the file in the desktop version and check the relevant settings there.

Frequently Asked Questions

Can Excel automatically adjust cell size as I type?
Excel can AutoFit rows and columns, but ordinary cell editing does not guarantee that every dimension will automatically resize as contents change. Run AutoFit again when needed. Wrapped text may change the row’s displayed content, but a manually set size or merged-cell layout can still require attention.

How do I AutoFit every column in a worksheet?
Click the Select All button at the top-left corner of the grid, then choose Home > Format > AutoFit Column Width. This applies the command across the selected worksheet columns. The result can be very wide if any column contains a long entry.

Why does AutoFit make my column too wide?
Excel is responding to a long displayed entry somewhere in the selected column. Find the unusually long cell, then consider wrapping its text, using a fixed column width, or moving the full detail elsewhere. AutoFit optimizes for showing the content, not for keeping the worksheet compact.

Can I AutoFit a merged cell?
AutoFit may not size rows or columns correctly for merged cells. If the content is clipped, unmerge the area and use another layout if practical, or adjust its row height and column widths manually.

Does AutoFit change the font or text in my cells?
No. AutoFit changes row height or column width; it does not edit cell contents or change the font. Shrink to Fit is a separate alignment option that changes the displayed text size to fit a column.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.