Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Autofit Numbers in Excel (Step-by-Step)

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To autofit numbers in Excel, the quickest method is to select the columns or cells containing your numbers, then double-click the right edge of any selected column header. Excel resizes the column to fit the widest entry, including numbers formatted with commas, decimals, or currency symbols. If double-clicking does not produce the result you want, you can use the ribbon: go to Home > Format > AutoFit Column Width, or press Alt+H+O+I on Windows. On Mac, use Format > Columns > AutoFit. This guide walks through each method, explains why numbers sometimes refuse to autofit, and covers the fixes.

What You'll Need

  • Microsoft Excel installed on Windows or Mac (the steps below note where they differ).
  • A spreadsheet containing numbers that are cut off, showing as ####, or leaving excess whitespace.
  • Basic familiarity with selecting cells and columns.

Step-by-Step

  1. Select the columns you want to resize. Click the column letter at the top of the sheet. To select several adjacent columns, click the first letter, hold Shift, and click the last. For non-adjacent columns, hold Ctrl (Windows) or Command (Mac) and click each letter.
  2. Locate the column boundary. Hover the mouse pointer over the vertical line between two column headers until the pointer changes to a double-headed arrow.
  3. Double-click the boundary. Excel instantly adjusts the column width to fit the longest value in that column, whether it is a number, a date, or text. If you selected multiple columns, all selected columns resize at once.
  4. Alternatively, use the ribbon. With the columns selected, go to Home > Format > AutoFit Column Width. On Mac, the path is Format > Columns > AutoFit. Menu labels can differ slightly by Excel version and region.
  5. Use the keyboard shortcut (Windows only). Press Alt, then H, then O, then I. This opens the Format menu and applies AutoFit Column Width. There is no default single-key shortcut for autofit on Mac.
  6. Autofit rows if needed. Numbers rarely need row height changes, but if a cell contains wrapped text alongside numbers, select the rows, then use Home > Format > AutoFit Row Height. You can also double-click the boundary between row numbers.
  7. Check the result. Confirm that no numbers display as #### (which means the column is too narrow) and that there is no excessive blank space. If a column still looks wrong, proceed to the troubleshooting section.

Common Mistakes

  • Double-clicking the wrong edge. The pointer must be on the boundary line between column headers, not inside a cell. If the pointer is a plain arrow, you will select the column instead of resizing it.
  • Autofitting only one cell. AutoFit works on entire columns or rows, not individual cells. Selecting a single cell and double-clicking the header edge still resizes the whole column based on its widest entry.
  • Expecting AutoFit to shrink columns. AutoFit sets width to the widest entry. If one cell contains a long text string, the column will stay wide even if your numbers are short. Remove or shorten the long entry first.
  • Ignoring merged cells. AutoFit does not work reliably on columns containing merged cells. Unmerge them (Home > Merge & Center) before autofitting.
  • Confusing number format with width. If a number shows as 1.23E+11, the issue is the cell format (scientific notation), not the column width. Change the format via Home > Number Format.

Tips

  • To autofit every column in a sheet at once, click the Select All button (the small triangle at the top-left corner where row and column headers meet), then double-click any column boundary.
  • If you want a consistent width across columns, select them and set a specific width via Home > Format > Column Width instead of autofitting each one.
  • Numbers formatted as text (often left-aligned by default) may not trigger autofit correctly. Convert them to numbers using Data > Text to Columns or by multiplying by 1 in an empty cell and pasting values back.
  • After autofitting, save the workbook. Column widths are saved with the file, so the layout persists when you reopen it.
  • On Mac, the double-click method works the same way; just ensure you are using the column header boundary, not the row boundary.

Troubleshooting

Double-click does nothing. Check that you are hovering exactly on the boundary line. If the pointer is not a double-headed arrow, move it slowly until it changes. Also confirm the sheet is not protected (Review > Unprotect Sheet).

Column stays too narrow and shows ####. The number may be too large for the current format, or the column contains a formula returning a long text string. Widen the column manually by dragging the boundary, or reduce decimal places via Home > Decrease Decimal.

AutoFit makes the column extremely wide. A single long text entry in that column is forcing the width. Find the longest cell, shorten it, or move it to another column, then autofit again.

Numbers appear left-aligned and autofit seems off. They are likely stored as text. Select the cells, go to Data > Text to Columns, and click Finish to convert them to numbers. Then autofit again.

Merged cells prevent resizing. Unmerge the cells, autofit the column, then remerge if necessary. Note that remerging may reintroduce the width issue.

Autofit option is greyed out. The sheet may be protected or the workbook may be in a view mode that restricts formatting. Go to Review > Unprotect Sheet, or switch to Normal view via View > Normal.

Frequently Asked Questions

Does autofit work on numbers formatted as currency or percentages?

Yes. AutoFit accounts for the displayed value, including currency symbols, thousands separators, and percent signs, so the column widens to show the full formatted number.

Can I autofit only a range of cells instead of whole columns?

No. Excel's AutoFit operates on entire columns or rows. To resize only part of a column, you would need to adjust the column width manually or restructure your data.

Why does my number show as #### after autofitting?

The #### display means the column is still too narrow for the formatted number, or the cell contains a negative date/time value. Widen the column manually or check the cell's format.

Is there a keyboard shortcut for autofit on Mac?

Excel for Mac does not have a default single-key shortcut for AutoFit. Use the Format menu or double-click the column boundary instead.

Will autofit change my number formatting?

No. AutoFit only changes column width or row height. Number formats, decimal places, and cell styles remain unchanged.

Can I autofit all sheets in a workbook at once?

Not directly. You must select all sheets (right-click a sheet tab > Select All Sheets), then autofit columns on one sheet; the action applies to all selected sheets.