How to Enable Autofit in Excel for Columns and Rows

How-to basics · Updated November 20, 2026

To AutoFit in Excel, select the column or row, then double-click the boundary on its right or bottom edge. For a menu option, go to Home > Format > AutoFit Column Width or AutoFit Row Height. AutoFit adjusts the selected cells’ size to show their contents; it is an action you apply, not a setting that stays switched on for future entries.

What You’ll Need

  • A workbook open in Microsoft Excel. These steps are for Excel for Microsoft 365 on Windows; most also work in recent desktop versions.
  • A cell, range, or row or column you want to resize. You can select several at once.
  • If you are resizing rows to show wrapped text, turn on Home > Wrap Text first so Excel can calculate the required row height.

Step-by-Step

  1. Open the worksheet and identify what needs to fit. Look for cut-off values or headings. A column is too narrow when its contents appear clipped or are shown as number signs; a row is too short when wrapped text is partly hidden. AutoFit sizes rows and columns separately, so decide which dimension needs adjustment.
  2. Select the column or columns. Click a column letter, such as B, to select the entire column. To select a continuous group, click the first letter and drag across the other letters, or click the first letter, hold Shift, and click the last. For non-adjacent columns, hold Ctrl while clicking each column letter.
  3. AutoFit the selected column width with the mouse. Move the pointer to the right-hand boundary of any selected column heading. When the pointer changes to a horizontal resize symbol, double-click. Excel adjusts each selected column to fit its longest visible entry. You can also drag the boundary if you prefer to set a width manually, but dragging is not AutoFit.
  4. Use the ribbon if you prefer a menu command. With the column or columns selected, choose Home > Format > AutoFit Column Width. Excel changes the width based on the contents of the selection. The command is useful when you want a precise, repeatable action or find it difficult to double-click the boundary.
  5. Select the row or rows you need to adjust. Click a row number to select that whole row. Select several adjacent or non-adjacent rows in the same way you selected columns. To AutoFit every row in the sheet, select the whole worksheet first, as described in the next step.
  6. AutoFit row height. Double-click the lower boundary of a selected row number, or use Home > Format > AutoFit Row Height. When text wrapping is enabled, Excel expands the row to display the wrapped lines. If the cell contains only a short, single-line value, the row may remain at its current-looking standard height.
  7. Apply AutoFit to an entire worksheet when appropriate. Click the small triangle at the top-left corner of the worksheet, where the row numbers and column letters meet, to select all cells. Then choose Home > Format > AutoFit Column Width, followed by AutoFit Row Height if needed. On Windows, Ctrl+A selects the current data region first; pressing it again usually selects the whole sheet. The corner selector is a reliable way to select the full worksheet.
  8. Check the result and adjust if necessary. Review long headings, dates, numbers, and wrapped paragraphs. AutoFit uses cell content and formatting to find a size, but a particularly wide column can make the sheet hard to scan. If it becomes too wide, drag its boundary to a more practical width or use Wrap Text and AutoFit the row instead.

On Windows, ribbon Key Tips provide a keyboard route: select the target cells and press Alt, then H, O, I to AutoFit Column Width. For row height, press Alt, then H, O, A. Press the keys in sequence rather than holding them all down. Keyboard sequences can vary with ribbon configuration or Excel version, so use the visible Home and Format menus if a sequence does not work.

In Excel for Mac, select the rows or columns and use the same double-click boundary method. You can also look for Home > Format > AutoFit Column Width or AutoFit Row Height on the ribbon. The Windows Alt Key Tips sequence is not the Mac shortcut; menu and ribbon labels may vary slightly by Mac release. In Excel for the web, use the column or row boundary double-click where available, or select the cells and check Home > Format for the AutoFit commands.

Common Mistakes

Double-clicking the wrong boundary: To fit a column, double-click the line between column letters, not the edge of a cell in the worksheet. For a row, double-click the line between row numbers. Clicking within the heading selects it but does not resize it.

Selecting cells instead of the whole columns or rows: If you select only a few cells and AutoFit a column, Excel may size it using the selected cells rather than all the entries you meant to account for. Select the column letters when you want the width to reflect the column’s contents, or select the exact rows or columns you intend to change.

Expecting AutoFit to stay enabled: AutoFit is not a persistent mode. If you type a longer entry later, the existing width might not expand automatically. Run AutoFit again, or set a width that leaves room for likely future entries.

Using AutoFit to solve every display problem: A wide value can make a column enormous, and a long paragraph may be easier to read in a wrapped cell. AutoFit chooses a size based on content; it does not decide what layout is easiest to use. Consider Wrap Text, a manual width, or a shorter heading when the automatic result is awkward.

Overlooking hidden columns or rows: A hidden column has no visible boundary to double-click. AutoFit will not make hidden content visible merely because you selected nearby cells. Unhide the relevant rows or columns first, then resize them.

Tips

For a quick, consistent result, select several columns together and AutoFit them in one go. Each column is measured against its own contents, so the columns will not all become the same width. This is often faster than adjusting a large table one column at a time.

Use Wrap Text when you want to keep a column narrow but still show a long label or note. Select the cells, choose Home > Wrap Text, and then AutoFit the row height. If the row does not expand, verify that the text is actually wrapping and that the row is not fixed at a height that prevents the expected display.

For headings that should remain visually uniform, consider setting a shared width manually instead of AutoFitting every column. Select the columns, right-click a selected column letter, choose Column Width, and enter a value. AutoFit is best for fitting varied content; a fixed width is often better for a polished report or a dashboard.

AutoFit can make a worksheet easier to read before printing, but check the print preview afterward. A very wide fitted column can increase the number of printed pages. If the sheet becomes too wide, use landscape orientation, adjust scaling, wrap text, or set a more compact width rather than allowing one long entry to dictate the layout.

When working with an imported file, format numbers and dates before deciding whether a column needs AutoFit. A date displayed in a readable date format may need less room than a long underlying value, while a number format with currency symbols or decimal places may need more. The displayed formatting affects the space Excel needs.

Troubleshooting

The text still looks cut off after AutoFit. Check whether the cell is merged with neighboring cells. Excel does not reliably AutoFit rows or columns based on merged-cell contents, so unmerge the cells if practical, or set the row height or column width manually. Also check that the text is not white or otherwise formatted to blend into the background; resizing will not fix a visibility issue caused by formatting.

A row does not grow to show all the text. Select the cell and check whether Home > Wrap Text is active. Then select the row and choose Home > Format > AutoFit Row Height. A manually set row height can interfere with the result. If needed, drag the row boundary to increase the height. Merged cells, rotated text, and some layouts can also prevent the expected automatic height.

A column becomes far too wide. One unusually long cell may be determining the width. Find the longest entry and decide whether it should wrap, be shortened, or remain clipped. You can set a manual width after AutoFit, or use Wrap Text for that column. Excel has a maximum column width, so extremely long content will not make a column expand without limit.

Double-clicking does nothing. Make sure you are on the boundary between the column letters or row numbers, and wait for the resize pointer before double-clicking. If the sheet is protected, resizing may be restricted by its protection settings. Try the corresponding command in Home > Format; if it is unavailable, check whether the worksheet is protected and whether you have permission to change its layout.

Some content remains hidden. Confirm the relevant rows and columns are not hidden, and check for filters that may be hiding records. AutoFit does not reveal filtered-out rows. If only part of a cell’s text appears, inspect its formatting, wrapping, merge status, and the adjacent cells, which can affect how overflow appears.

Frequently Asked Questions

Is AutoFit an Excel setting that stays on?
No. It immediately adjusts the selected row height or column width. If you later enter longer content, run AutoFit again or choose a manual size that anticipates future entries.

Can I AutoFit every column and row at once?
Yes. Select the whole worksheet with the corner button above row 1 and left of column A. Then choose Home > Format > AutoFit Column Width and, if needed, AutoFit Row Height. This may make the worksheet unusually wide if a cell contains a long entry.

What is the difference between AutoFit Column Width and AutoFit Row Height?
Column Width changes how much horizontal space a column uses. Row Height changes its vertical space. AutoFit Column Width is useful for clipped headings or values; AutoFit Row Height is especially useful for cells with wrapped text.

Why does AutoFit make one column much wider than the others?
Excel sizes each column to fit its longest relevant entry, so one long value or heading can set the width. Use Wrap Text, shorten the entry, or set a manual column width if the result is not practical.

Does AutoFit work with merged cells?
Not reliably. Merged cells can stop Excel from calculating the needed row height or column width. If the layout allows, unmerge the cells and use alignment or wrapping instead; otherwise, resize the affected rows or columns manually.

Can I AutoFit in Excel for the web or on a Mac?
Yes. The double-click boundary method works in many current versions, and the Home tab may offer AutoFit commands under Format. The Windows Alt Key Tips sequence is not a Mac shortcut; use the ribbon or menu available in your version.

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.