Fit Columns to Text in Excel: Quick Methods and Fixes

How-to basics · Updated November 21, 2026

To fit a column to its text in Excel for Microsoft 365 on Windows, select the column and choose Home > Format > AutoFit Column Width. For a quick adjustment, double-click the right edge of the column letter. Excel widens or narrows the column to fit its displayed contents, subject to its maximum width.

What AutoFit Column Width Does

AutoFit measures the contents of cells in a column and sets the width to accommodate the widest displayed entry. It considers the visible result of a formula, not just the formula text. For example, a cell containing a formula that returns September sales will be sized for the displayed result, while a formula that returns a short number needs less room.

Formatting matters because Excel has to make the displayed value fit. A date formatted as September 30, 2026 may require more width than the same date displayed as 9/30/26. A larger font, bold text, indentation, or other cell formatting can also affect the space required. Excel measures column width in character-based units related to the workbook’s standard font, so a width value is not a fixed number of pixels across every display.

AutoFit does not change the cell’s contents or rewrite a formula. It changes the width of the column, which affects every cell in that column. If an entry is unusually long, fitting it may make the entire column much wider than the rest of the worksheet.

Fit One Column to Its Contents

Use the ribbon when you want an explicit command or need to fit more than one column:

  1. Click the column letter, such as B, to select the entire column. To fit only some columns, select the relevant column letters.
  2. On the Home tab, open Format in the Cells group.
  3. Select AutoFit Column Width.

For one column, you can skip the ribbon: move the pointer to the boundary on the right side of its column letter until the pointer changes to a resize indicator, then double-click. The column adjusts to its contents. Dragging that same boundary instead lets you choose a width by eye; it is not AutoFit.

If you select a range of cells rather than whole columns, the ribbon command adjusts the widths of the columns that intersect the selection. That can be useful when you are working in a small part of a large sheet. For a predictable selection, select the column letters first.

Fit Several Columns at Once

To fit a group of adjacent columns, drag across their column letters. To choose columns that are not next to each other, hold Ctrl while clicking each column letter on Windows. Then use Home > Format > AutoFit Column Width. Excel calculates a suitable width separately for each selected column; it does not make all of them the same width.

You can also select the whole worksheet by clicking the Select All button at the upper-left corner of the grid, where the row and column headings meet, and then choose AutoFit Column Width. This can make a crowded sheet easier to read, but it may also create very wide columns if even one cell contains a long string. Consider fitting only the columns people need to scan, especially in large worksheets or reports.

For example, if a table has short product codes in column A, customer names in B, and comments in C, fitting all three may produce two compact columns and one very wide comments column. Fitting only A and B first, then wrapping the comments in C, usually gives a more readable layout.

AutoFit, Wrap Text, and Row Height

AutoFit Column Width and Wrap Text solve different problems. AutoFit makes a column wider so an entry can appear on one line. Wrap Text keeps the column narrower and displays a long entry on multiple lines within the cell. When a worksheet contains descriptions, notes, or addresses, wrapping can preserve space for neighboring columns.

To wrap text, select the cells or columns and choose Home > Wrap Text. Set a practical column width by dragging its boundary or using Home > Format > Column Width. Excel will normally increase row heights to show wrapped lines. If the rows do not display all the text, select them and choose Home > Format > AutoFit Row Height.

Fitting a column after turning on Wrap Text is not always the best way to get a compact layout: widening the column can reduce the number of wrapped lines, while a deliberate width can keep the table readable. Likewise, AutoFit Row Height adjusts vertical space; it does not make a column wider. Choose the command that matches what is clipped.

Common AutoFit Problems and Their Fixes

AutoFit is straightforward for ordinary, unmerged cells, but a few situations can make the result look wrong or fail to change the layout:

  • Merged cells: Excel may not AutoFit a column correctly when the text is in a merged range. A merged cell spans multiple columns, so Excel cannot assign the required width to just one column in the usual way. Unmerge the cells if practical, or set the column widths manually and adjust row height.
  • Wrapped text: A narrow, wrapped cell may need more row height rather than more column width. Use AutoFit Row Height or set a suitable width and keep Wrap Text enabled.
  • Text appears clipped: Text in a cell can spill visually into an empty cell to its right, but it cannot spill over a neighboring cell that contains data. AutoFit the column or wrap the text to show the full entry.
  • Hash marks appear: A series of hash marks, such as ####, often means a number or date does not fit. AutoFit may fix that. If the value is a negative date or time that Excel cannot display in the selected date system, widening the column will not solve the underlying issue.
  • The column becomes extremely wide: A long unbroken string, such as a tracking code or pasted URL, can force a large width. Set a manual width and consider wrapping, shortening the displayed text, or placing the full value in a separate details column.
  • Hidden columns: If a column is hidden, unhide it before adjusting its width. Select the columns around the hidden one, right-click a selected column heading, and choose Unhide. Then apply AutoFit as needed.

Excel limits a column’s width to 255 characters in its width measurement. Consequently, an extremely long entry may still not fit on one line after AutoFit. In that case, wrapping or a manual layout is more useful than expecting the column to expand without limit.

When to Use a Manual Width Instead

AutoFit is a good choice for initial cleanup, but it does not know how people will read or print the worksheet. A column sized for the longest comment may dominate the screen, even though most comments are short. In a report, consistent widths can make columns easier to compare; in a data-entry sheet, extra room may prevent users from overlooking what they type.

To set a specific width, select the column or columns, choose Home > Format > Column Width, enter a value, and select OK. The value uses Excel’s character-based width units, not a universal pixel measurement. You can also drag a column boundary for a visual adjustment. If you need several columns to match, select them together and enter one width rather than AutoFitting each independently.

A practical approach is to AutoFit short identifiers and names, then set a deliberate width for long descriptions. For a printed worksheet, check the result in Print Preview: a very wide AutoFit column can push a table across extra pages. Page layout settings and scaling may help, but shrinking an entire sheet to fit can make text difficult to read.

Keyboard Shortcuts and Other Excel Versions

In Excel for Microsoft 365 on Windows, select the column or columns and press Alt, H, O, I in sequence. This opens the Home tab’s Format command and applies AutoFit Column Width. The keys are pressed one after another, not as a single simultaneous shortcut. To fit row height, the corresponding sequence is Alt, H, O, A.

On a Mac, Windows Alt-key sequences do not apply. Use the ribbon command or double-click the column boundary. In Excel for the web, select the column and use the Home tab’s Format menu if AutoFit Column Width is available in the current ribbon layout; double-clicking the column boundary is another direct method. The exact placement of controls can differ slightly with window size and interface updates, but the column-boundary method is widely recognizable.

AutoFit changes worksheet layout, not the underlying data, so it is generally safe to use. Still, before applying it to every column in a shared or carefully formatted report, consider whether the resulting widths will disrupt its layout. Undo with Ctrl+Z on Windows or Command+Z on Mac if the result is not what you intended.

Frequently Asked Questions

How do I automatically resize all columns in Excel?

Click the Select All button at the top-left of the worksheet grid, then choose Home > Format > AutoFit Column Width. Check for unusually wide columns afterward, since one long cell can make a column much wider than expected.

What is the shortcut to AutoFit a column in Excel?

On Windows, select the column and press Alt, H, O, I in sequence. On a Mac, use the ribbon command or double-click the right edge of the column heading; the Windows key sequence is not the Mac shortcut.

Why does AutoFit not work on merged cells?

A merged cell occupies more than one column, so Excel cannot reliably calculate the width needed for just one column. Unmerge the cells when possible, or set widths and row heights manually.

How do I make text fit without making the column wider?

Select the cells and choose Home > Wrap Text. Then set a suitable column width and use AutoFit Row Height if all wrapped lines are not visible.

Why does Excel still show #### after AutoFit?

The value may still be too wide, or Excel may be unable to display a negative date or time in the selected date system. Try a wider column or a shorter number format; if the value is a negative date or time, investigate the value rather than only changing the width.

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.