How to Turn On AutoFit in Excel for Rows and Columns

How-to basics · Updated November 20, 2026

To AutoFit in Excel for Microsoft 365 on Windows, select the rows or columns you want to resize, then choose Home > Format > AutoFit Column Width or AutoFit Row Height. You can also double-click the boundary between selected column letters or row numbers. AutoFit adjusts the size to fit the content currently in the cells; it is a command you run when needed, not a setting that stays on.

What You’ll Need

  • A workbook open in Excel for Microsoft 365 on Windows.
  • Cells with content whose column width or row height you want to adjust. You can select one column or row, a group, or the whole worksheet.
  • For the double-click method, visible column-letter or row-number headers. If the relevant headers are hidden, use the ribbon command instead.

You do not need to install an add-in or enable a special AutoFit preference. If your goal is to show long text on multiple lines, you may also want to turn on Wrap Text; AutoFit Row Height can then adjust the row to show those lines.

Step-by-Step

  1. Open the worksheet and identify what needs resizing. Decide whether the problem is a column that is too narrow, a row that does not show all its lines, or both. Column width controls how much text fits horizontally. Row height controls the vertical space available to display cell contents. AutoFit them separately if both need adjustment.
  2. Select the relevant columns or rows. To select one column, click its letter at the top of the worksheet; to select one row, click its number at the left. Drag across adjacent letters or numbers to select several. For nonadjacent columns or rows, hold Ctrl on Windows while clicking each header. If you want to resize the entire worksheet, click the Select All button at the intersection of the row numbers and column letters, then run the relevant AutoFit command.
  3. AutoFit column widths from the ribbon. With the columns selected, go to Home > Format > AutoFit Column Width. Excel sets each selected column wide enough for its longest visible cell entry, subject to Excel’s maximum column width. The adjustment applies to the selected columns, not just the active cell.
  4. AutoFit row heights from the ribbon. Select the rows, then choose Home > Format > AutoFit Row Height. Excel adjusts the selected rows to display their contents, including wrapped lines when the cells are set to Wrap Text. If text remains on a single line, the row may not grow; use Wrap Text first if you want it to break across lines.
  5. Use the header boundary as a shortcut. Select one or more columns, then move the pointer to the right edge of one of the selected column letters. When it becomes a horizontal resize pointer, double-click the boundary to AutoFit the selected columns. For rows, select the rows and double-click the boundary below one of their row numbers. Double-clicking a boundary without selecting a group adjusts only the column or row at that boundary.
  6. Check the result and repeat for the other dimension if needed. Look at the longest values, wrapped paragraphs, and headings. A column width adjustment does not automatically change row height, and a row height adjustment does not widen columns. Select the relevant cells or headers and run the other AutoFit command if the worksheet still clips content.

For a quick adjustment to just one column, you can also double-click the divider on the right side of its letter header without first selecting the whole column. The same principle applies to a single row: double-click its lower divider. These methods are useful for a small table, while the ribbon commands make it clearer which selected group will be changed.

On Excel for Mac, the same AutoFit commands are available from the Home tab’s Format menu; select the columns or rows and choose AutoFit Column Width or AutoFit Row Height. The header-boundary double-click method works there as well. In Excel for the web, select the relevant headers and look for the AutoFit commands under Home > Format; if the command is not available in your current view, use the boundary double-click method or open the workbook in the desktop app.

Common Mistakes

  • Expecting AutoFit to remain switched on. AutoFit makes a one-time adjustment based on the content at that moment. If you later enter a longer value, paste data, or change a formula result, run AutoFit again if the new content no longer fits.
  • Using the wrong command. AutoFit Column Width changes horizontal space; AutoFit Row Height changes vertical space. If wrapped text is clipped vertically, widening the column alone may not solve it. If a heading is cut off sideways, increasing row height is not the right fix.
  • Selecting only a cell when you meant to resize a whole group. Ribbon commands work on the selected rows or columns. Click the headers for the intended range before running AutoFit, and verify that you did not leave out a column or row at either end.
  • Expecting merged cells to AutoFit normally. Excel may not calculate the needed row height or column width correctly for content in merged cells. AutoFit has limitations with merged ranges, so consider unmerging the cells, using Wrap Text, and adjusting the row height manually. You can also use Center Across Selection instead of merging when the layout allows it.
  • Thinking a very wide column is always a problem. A long unbroken entry, such as a URL or string without spaces, can make AutoFit widen a column substantially. Excel has a maximum column width, so some long text still will not fit on one line. Wrap Text or manual sizing may be more useful.

Tips

  • Use Wrap Text for notes and descriptions. Select the cells, choose Home > Wrap Text, and then AutoFit the rows. This keeps a long entry within a reasonable column width while making the row taller to display multiple lines. Adjust the column width first if the resulting lines are too short or too long.
  • AutoFit a whole sheet when appropriate. Click the Select All button above row 1 and left of column A, then choose Home > Format > AutoFit Column Width. Repeat with AutoFit Row Height if needed. On a large worksheet, this can make the layout much wider or taller than intended, so use it selectively when practical.
  • Use manual sizing for a consistent report. AutoFit can produce columns of different widths based on their contents. If a report needs uniform columns, select them and drag a header boundary to a chosen width, or use Home > Format > Column Width. For rows, choose Home > Format > Row Height and enter a value.
  • Review numbers and dates after resizing. AutoFit uses the displayed cell content and number format. A date or currency format may need more room than the underlying value. If you see number signs in a cell, the column is generally too narrow to display the formatted number; AutoFit or a modest manual increase may resolve it.
  • Keep print layout in mind. A width that makes every value readable on screen can cause a worksheet to span more printed pages. Check Page Layout or Print Preview after resizing a sheet intended for printing, and choose a practical balance between readability and page width.

Troubleshooting

The text still looks cut off after AutoFit. First check whether the content is in a merged cell, contains an unusually long string without spaces, or is subject to a maximum column width. Try Wrap Text and AutoFit Row Height, or set a suitable width and height manually. Also check whether the font is large or the cell has indentation, since either can require extra space.

A row does not get taller for wrapped text. Select the affected cells and confirm that Home > Wrap Text is enabled. Then select the row header and run Home > Format > AutoFit Row Height. If the row is merged with another cell, Excel may not AutoFit it correctly; unmerge the cells or set the row height manually. A fixed row height can also prevent the content from displaying fully, so use AutoFit Row Height or enter a larger height.

The ribbon command is unavailable or seems to do nothing. Make sure you are in a worksheet rather than editing a cell, and select at least one row or column header. If the sheet is protected, its protection settings may prevent formatting changes; ask the workbook owner or unprotect it if you have permission. Also check whether the selected rows or columns are hidden, because hidden items will not become visible simply by AutoFitting them.

Double-clicking does not resize the expected range. Double-click directly on the divider between the header labels, not inside a cell. To resize multiple columns or rows, select all of their headers before double-clicking a boundary belonging to that selection. If your pointer does not change to a resize pointer, use Home > Format and choose the appropriate AutoFit command instead.

New entries no longer fit. AutoFit does not continuously monitor changes. After adding data or changing formulas, rerun the relevant AutoFit command. If the worksheet changes often and you need stable dimensions, set a deliberate manual width and use Wrap Text for variable-length descriptions rather than repeatedly widening columns.

Frequently Asked Questions

Is AutoFit an on-or-off setting in Excel?

No. AutoFit is a command that resizes selected rows or columns using the content currently present. It does not automatically run whenever you edit a cell. Run it again after updates if the dimensions need to change.

Can I AutoFit every column and row at once?

Yes. Click the Select All button at the upper-left corner of the worksheet, then choose Home > Format > AutoFit Column Width. Repeat with AutoFit Row Height if you also want the rows adjusted. Check the result, since fitting every entry can create a very wide worksheet.

How do I AutoFit a column with a keyboard?

On Windows, select the column or columns and press Alt, H, O, I in sequence to use AutoFit Column Width. For selected rows, press Alt, H, O, A to use AutoFit Row Height. These are ribbon KeyTips, so press the keys one after another rather than as a simultaneous shortcut. KeyTips and keyboard behavior can vary by Excel version and keyboard layout; the ribbon path is a dependable alternative.

Why does AutoFit make one column unusually wide?

Excel sizes the column to accommodate its longest cell entry, so one long description, URL, or unbroken string can determine the width. Use Wrap Text, shorten or split the entry, or set a manual width if a wide column is not useful. AutoFit cannot exceed Excel’s maximum column width.

Does AutoFit work with merged cells?

Not reliably. Excel has limitations when calculating the correct dimensions for merged cells. Unmerge the range if possible, apply Wrap Text, and AutoFit the rows; otherwise set the height or width manually. Consider Center Across Selection when you need a centered heading without merging cells.

What is the difference between AutoFit and Wrap Text?

AutoFit changes a row’s height or a column’s width to fit content. Wrap Text displays longer content on multiple lines within the existing column width, often requiring a taller row. They can be used together: set a sensible column width, turn on Wrap Text, then AutoFit Row Height.

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.