Smart Systems for Home

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

How to Autofit Entire Sheet in Excel: Quick Guide

· 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 an entire sheet in Excel, select all cells (Ctrl+A or click the top-left corner triangle), then double-click any column boundary in the column header. This sets every column to its optimal width. For row heights, select all cells and double-click any row boundary in the row header. Alternatively, use Home > Cells > Format > AutoFit Column Width and AutoFit Row Height. This guide walks you through each method, notes version differences, and covers common pitfalls.

What You'll Need

  • Microsoft Excel (any modern version: Microsoft 365, Excel 2019, 2021, or 2024) on Windows or Mac.
  • A spreadsheet with data you want to resize.
  • Basic familiarity with selecting cells and using the ribbon.

Step-by-Step

  1. Select the entire sheet. Click the small triangle at the intersection of the row numbers and column letters (top-left corner). Or press Ctrl+A (Windows) or Command+A (Mac). If your data has blank cells, you may need to press Ctrl+A twice to select the whole sheet.
  2. Autofit columns using the double-click method. Hover your cursor over the boundary line between any two column headers (e.g., between A and B) until it becomes a double-headed arrow. Double-click. All columns will resize to fit their widest content.
  3. Autofit rows using the double-click method. Hover over the boundary line between any two row numbers (e.g., between 1 and 2) until it becomes a double-headed arrow. Double-click. All rows will resize to fit their tallest content.
  4. Alternatively, use the ribbon. With the entire sheet selected, go to Home > Cells > Format. Under Cell Size, click AutoFit Column Width, then repeat and click AutoFit Row Height. (On Mac, the path is Home > Format > AutoFit Column Width / AutoFit Row Height.)
  5. Check the result. Columns and rows should now fit their content. If some cells still show cut-off text, see Troubleshooting below.

Common Mistakes

  • Not selecting the entire sheet. If you only select a range, autofit applies only to that range. Always select all cells first (click the corner triangle).
  • Double-clicking the wrong spot. You must double-click the boundary line between headers, not the header itself. The cursor changes to a double-headed arrow when you're in the right place.
  • Expecting autofit to fix wrapped text. Autofit adjusts column width and row height based on content, but if a cell has wrap text enabled, the row height may already be set manually. You may need to turn off wrap text or manually adjust row height.
  • Forgetting merged cells. Autofit does not work on merged cells. You'll need to unmerge, autofit, then remerge if necessary.
  • Using autofit on hidden rows or columns. Hidden rows/columns are not affected. Unhide them first if you want them autofitted.

Tips

  • To autofit only specific columns, select those columns (click and drag across headers) and then double-click a boundary within the selection.
  • Keyboard shortcut: Alt+H+O+I (Windows) autofits column width; Alt+H+O+A autofits row height. On Mac, use the ribbon or menu.
  • If you frequently need autofit, consider adding the AutoFit buttons to the Quick Access Toolbar: File > Options > Quick Access Toolbar, then choose All Commands and add AutoFit Column Width and AutoFit Row Height.
  • Autofit works best when cells contain text or numbers without manual line breaks. For cells with line breaks, row height may need manual adjustment.
  • After autofitting, you can still manually adjust individual columns or rows if needed.

Troubleshooting

If autofit doesn't seem to work, check these common issues:

  • Text still cut off: The column may contain a formula that returns a long text string, or the cell may have wrap text enabled. Try turning off wrap text (Home > Alignment > Wrap Text) and then autofit again.
  • Rows won't shrink: Row height may be set to a specific value. Select the rows, right-click, choose Row Height, and set to Auto. Or double-click the row boundary again.
  • Merged cells block autofit: Unmerge the cells (Home > Merge & Center > Unmerge Cells), autofit, then remerge if needed.
  • Autofit only affects visible cells: If rows or columns are hidden, unhide them first (select entire sheet, right-click a header, choose Unhide).
  • Excel freezes or is slow: Autofitting a very large sheet (tens of thousands of rows) can take time. Save your work and be patient, or autofit in smaller sections.

Frequently Asked Questions

Does autofit work on all versions of Excel?

Yes, autofit is available in all modern Excel versions for Windows and Mac, including Microsoft 365, Excel 2019, 2021, and 2024. The menu labels may differ slightly by version and region.

Can I autofit only one column?

Yes. Select the column (click the column header), then double-click the boundary on the right side of that header. Or use Home > Format > AutoFit Column Width.

Why doesn't autofit make my rows taller to show wrapped text?

Autofit adjusts row height based on the content, but if wrap text is on and the row height was manually set, it may not expand. Select the rows, then use Home > Format > AutoFit Row Height, or double-click the row boundary.

Does autofit work on merged cells?

No, autofit does not work on merged cells. You must unmerge them first, autofit, and then remerge if needed.

Is there a keyboard shortcut for autofit?

On Windows, Alt+H+O+I autofits column width, and Alt+H+O+A autofits row height. On Mac, there is no default shortcut; use the ribbon or menu.

Will autofit change my column widths permanently?

Yes, autofit sets the column width to the optimal size for the current content. If you later add longer text, you'll need to autofit again.