Where Is AutoFit in Excel? Find the Column and Row Tools

How-to basics · Updated November 20, 2026

In Excel for Microsoft 365 on Windows, AutoFit is on the Home tab: choose Home > Format in the Cells group, then select AutoFit Column Width or AutoFit Row Height. You can also double-click the boundary between column letters or row numbers to fit the selected column or row to its contents.

Where to find AutoFit on the ribbon

On the Excel ribbon, open the Home tab and look toward the right-hand side for the Cells group. Select Format to open its menu. The AutoFit commands are listed there, alongside options for setting a specific column width or row height, hiding and unhiding rows or columns, and changing the default width. Choose the command that matches what you need:

  • AutoFit Column Width adjusts the width of one or more selected columns.
  • AutoFit Row Height adjusts the height of one or more selected rows.

If the Excel window is narrow, the ribbon may compress groups or show fewer labels. Maximize the window or look for the Cells group’s Format menu on the Home tab. The commands are not in the Layout tab, and they are different from the buttons for wrapping text or merging cells. AutoFit is a sizing command: it changes the dimensions of the selected rows or columns based on what is in their cells.

Use the ribbon commands step by step

To resize a column, first select it by clicking its letter at the top of the worksheet. To select several adjacent columns, drag across their letters; for nonadjacent columns, hold Ctrl while clicking each letter. Then choose Home > Format > AutoFit Column Width. Excel sets each selected column’s width to fit the displayed contents in that column. For rows, select the row number or numbers and choose Home > Format > AutoFit Row Height.

You can also start by selecting cells in the relevant columns or rows, then choose the appropriate AutoFit command. The change applies to the corresponding worksheet columns or rows, not just to the individual cell you clicked. If you want to fit every column on a sheet, select the whole worksheet using the Select All button at the corner where the row numbers and column letters meet, then choose AutoFit Column Width. Apply AutoFit Row Height separately if you also want to resize all rows.

On Windows, keyboard users can open the Home tab’s Format menu with Alt+H, O. From there, Alt+H, O, I runs AutoFit Column Width, and Alt+H, O, A runs AutoFit Row Height. These are ribbon key sequences: press the keys in order rather than holding them all down together. If a sequence does not work in a particular Excel build or keyboard setup, use the ribbon menu, which is the dependable way to locate the command.

The quick mouse method

For a fast adjustment, move the pointer to the divider between two column headings, such as the line between A and B. When the pointer changes to a horizontal resize symbol, double-click the divider. Excel autofits the column on its left. To fit several columns at once, select their headings first and double-click the boundary of one of the selected columns; Excel adjusts the selected columns individually. Double-clicking the divider between row numbers works similarly for row height.

This method is convenient when only one or a few columns need attention, such as widening a product-name column that displays #### or truncates a long entry. It is also useful for checking the result visually before moving on. A single click and drag on the same boundary is not AutoFit: it sets a manual width or height. If the double-click does not produce the expected change, confirm that you are on the boundary and that the column or row is not hidden or constrained by another worksheet feature.

What AutoFit measures

AutoFit is based on the content Excel needs to display, together with relevant formatting. In a column, Excel looks for the widest displayed cell value among the cells in that column and chooses a width that accommodates it. A long heading may therefore make the entire column much wider, even if the data beneath it is short. Bold text, a larger font, or a number format that displays extra characters can also affect the size needed.

Column width is not a simple measurement in pixels. Excel expresses it in character-based units related to the standard font used by the workbook, then translates the setting into screen space. Row height is measured in points. AutoFit is therefore intended to make cell contents legible, not to make a table occupy a particular fraction of the window or print on one page. A column can be autofitted and still be wider than you want for a compact report.

For example, suppose column B contains short department names except for one entry, Customer Experience and Support. AutoFit may widen all of B to display that longest value on one line. If the goal is a tidy report rather than a single-line entry, a fixed width plus Wrap Text may be preferable. AutoFit is a useful starting point, but it does not know which values matter most or how you want the worksheet laid out.

Rows, wrapped text, and long entries

AutoFit Row Height is particularly useful after you turn on wrapping. Select the relevant cells or rows, choose Home > Wrap Text, and then use Home > Format > AutoFit Row Height if the rows do not expand as expected. Excel can then increase the row height to show multiple lines within the existing column width. The row’s height depends on the amount of wrapped content and its formatting.

Without wrapping, a long text entry usually extends visually into empty cells to its right, if those cells are empty. If the neighboring cell contains anything, the text may appear cut off even though the full value is still in the cell. AutoFitting the column can reveal the whole entry, but that may create an excessively wide sheet. Wrapping the text and fitting the row is often a better choice for notes, addresses, or descriptive labels.

There is an important exception: Excel does not reliably AutoFit row height or column width for cells merged across multiple rows or columns. If a merged heading is clipped, try unmerging it, autofitting the relevant rows or columns, and then applying the layout you need. For headings that must span several columns, Center Across Selection or a text box may be more practical than merging, depending on how the worksheet will be sorted and edited.

Common AutoFit problems and fixes

If AutoFit appears to do nothing or produces a surprising result, check the cell contents and formatting before changing the column manually. These common situations explain many apparent failures:

  • The column becomes very wide: A single long value, heading, large font, or displayed number format may be setting the width. Consider wrapping the text or choosing a deliberate fixed width.
  • Text still seems hidden: Check whether an adjacent cell contains data, whether Wrap Text is on, and whether the row height needs to be autofitted. Also check for merged cells.
  • A number shows ####: The value may not fit in the current column. Autofit the column first; for dates or numbers, a different number format may also make the display more suitable.
  • A row does not expand enough: Confirm that the row is not merged with another row and run AutoFit Row Height again after setting the column width and Wrap Text.
  • The result is too large for the sheet: AutoFit prioritizes showing content, not keeping a table compact. Set a fixed width or height afterward if a consistent layout matters more.

Another useful distinction: AutoFit does not change the underlying value, formula, or number format. It changes only the size of the row or column. If a formula returns a long result, fitting the column can make more of that result visible, but it does not alter the calculation.

AutoFit versus setting a fixed size

AutoFit and a fixed width solve different problems. AutoFit is quick when the priority is showing the current content. A fixed column width is better when you need consistent alignment across a report, want to limit horizontal scrolling, or expect new entries to be longer than the existing ones. You can set a fixed size through Home > Format > Column Width or Row Height and enter a value.

AutoFit also responds to content changes only when you run it. If you autofit a column and then type a longer entry, Excel may not automatically resize the column to fit that new value. Run AutoFit again, use the mouse boundary method, or choose a fixed width that allows for expected future entries. For a frequently updated worksheet, this avoids assuming that the initial fit will adapt every time data changes.

For printing, AutoFit should not be confused with page scaling. If columns fit the text but the worksheet prints across several pages, use the page layout and scaling settings to manage the printed page. Those settings affect how the worksheet is laid out for printing; AutoFit only changes worksheet row heights or column widths.

Excel for Mac and Excel for the web

In Excel for Mac, look on the Home tab for Format and choose AutoFit Column Width or AutoFit Row Height. The boundary double-click method is also available. Keyboard shortcuts can differ between Mac and Windows because of the operating system, Excel version, and keyboard settings, so use the ribbon path if a Windows Alt sequence is not applicable.

In Excel for the web, the Home tab includes formatting controls, and the Format menu provides AutoFit options when available in the current ribbon layout. The exact presentation can vary with the browser window size. You can also use the column or row boundary to adjust sizing. If you cannot see the command, expand the ribbon or open the relevant formatting menu; the desktop Windows Alt sequences should not be assumed to work in a browser.

Frequently Asked Questions

Where is AutoFit Column Width in Excel?
Choose Home > Format > AutoFit Column Width. You can also select a column and double-click the boundary on its right side in the column headings.

Where is AutoFit Row Height in Excel?
Choose Home > Format > AutoFit Row Height after selecting the row or rows. Double-clicking the divider below a selected row number is the quick mouse alternative.

What is the keyboard shortcut for AutoFit in Excel?
On Windows, use Alt+H, O, I for AutoFit Column Width and Alt+H, O, A for AutoFit Row Height. They are sequential ribbon key presses, not one combined keystroke.

Can I AutoFit every column in a worksheet?
Yes. Click the Select All button at the top-left corner of the grid, then choose Home > Format > AutoFit Column Width. This may make the sheet very wide if even one cell contains a long value.

Why does AutoFit not work on merged cells?
Excel has limitations autofitting cells merged across rows or columns, so the row or column may not expand to show all the text. Unmerge the cells, fit the dimensions, and then choose another layout if the heading still needs to span the area.

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.