Smart Systems for Home

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

How to Autofit Multiple Columns in Excel

· 7 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 several columns at once, select the columns you want to resize, then double-click any boundary between two of the selected column headers. Every selected column, including any hidden between them, jumps to the width of its widest entry. That is the fast answer. From there, the rest of this guide covers row heights, wrapped text that refuses to cooperate, merged cells, and the menu route when double-clicking will not quite do what you want. Excel labels can vary slightly by version, platform and region, but the mechanics below work the same on Windows, Mac and Excel for the web.

What You'll Need

  • Excel for Windows, macOS or the web version, open on the sheet you want to tidy.
  • Columns that actually contain data. Autofit measures cell contents, so an empty column will only shrink to a default width.
  • A mouse or trackpad if you plan to double-click headers. Keyboard-only users can use menu commands instead, covered in Step 6.
  • Optional: a healthy margin. Autofit ignores cells inside merged areas and cells hidden in filtered rows, so check for those first if the results look wrong.

Step-by-Step

  1. Confirm what counts as a column boundary. The boundary is the thin vertical line in the header row between column letters (A, B, C and so on). Your pointer turns into a double-headed horizontal arrow when you hover it. That arrow is your cue that you are in the right spot.
  2. Select the columns you want to resize. Click the first column letter, then hold Shift and click the last one to grab a contiguous block. Hold Ctrl (Windows) or Command (Mac) to add non-adjacent columns one at a time. To resize every column on the sheet, click the small box at the top-left corner of the grid, where the row numbers meet the column letters, or press Ctrl+A twice.
  3. Double-click a boundary inside the selection. With the columns still highlighted, hover the boundary to the right of any selected column letter until the pointer becomes the double arrow, then double-click. All selected columns autofit together. This is the single most useful trick in the whole process, because doing it once beats dragging twelve separate lines.
  4. Check the result. Look for any column still showing a truncated value (a row of ### in a numeric column, or cut-off text). Those are usually columns that were not selected, or ones where a merged cell or hidden row is interfering. Reselect and try again.
  5. Autofit row heights the same way. Select the row numbers you want to change, hover the boundary between two of the selected row numbers, and double-click. Rows with wrapped text are the ones that benefit most. If nothing changes, the row is probably at its manual height, so double-check the row is selected before the double-click.
  6. Use the menu if your aim with the mouse is unreliable. Select the columns, then go to Home > Format > AutoFit Column Width (the Format button sits in the Cells group). On Excel for Mac the equivalent lives under Format > Columns > AutoFit Selection. This is also the better option when you are working on a laptop trackpad where double-clicks tend to register as single ones.
  7. Fix a single stubborn column. Select just that column and double-click its right-hand boundary on its own. Autofit only ever affects the columns you have selected, so isolating one is the cleanest way to troubleshoot.
  8. Reset if the result is too wide. If a long comment or a stray value in one cell pushes a column absurdly wide, the column has autofitted to that one outlier. Either shorten the value, or set a fixed width by dragging the boundary and then leave it manual. Autofit always honours the widest cell, with no built-in cap.

Common Mistakes

Double-clicking without selecting first. The classic error: you double-click a single boundary and only that one column resizes. If the neighbouring columns were not highlighted beforehand, you get one column, not the set. Select first, double-click second, always in that order.

Expecting merged cells to autofit. Excel ignores merged cells when calculating autofit. If a header is merged across three columns, the width is driven by the other content in the underlying column. Unmerge the header, autofit, then remerge if you must. The same applies to cells with wrapped text, which can push rows taller rather than columns wider.

Assuming hidden rows count. Rows hidden by a filter are excluded from the autofit calculation, so a long value in a filtered-out row will not widen the column. Clear the filter, autofit, then reapply it if you need the column to accommodate every row.

Dragging instead of double-clicking. Dragging a boundary sets a manual width and breaks the autofit link, so future content changes will not resize the column. If you find autofit no longer responds, reset the column to default width and try again, or use the Format menu command, which forces an autofit recalc.

Confusing autofit with wrap text. Autofit makes a column wider; wrap text makes a cell taller. If you want a narrow column with long text wrapped over several lines, turn on Wrap Text on the Home tab and then autofit the row heights, not the column widths.

Tips

  • Autofit across a whole sheet in one move by clicking the corner box above row 1 and left of column A, then double-clicking any header boundary. It resizes every column and row at once, which is a fast way to make a messy export readable.
  • On Excel for the web, autofit works on selected columns but dragging boundaries is the more reliable route in some browsers. If the header double-click does nothing, use Home > Format > AutoFit Column Width.
  • Use the Home > Format menu when you need certainty. It applies the same calculation as the double-click but never misfires on a trackpad.
  • Remember that autofit is a one-time calculation until the sheet recalculates. Editing a cell to make it much longer will not re-widen the column automatically; repeat the double-click or menu step.
  • If the printed output is the goal, autofit the columns first, then use Page Layout > Width to force everything onto one page. Autofit plus page scaling solves most print-cutoff complaints.
  • For consistent-looking tables, autofit, then nudge the widths by eye. Perfectly autofitted columns often vary wildly in width and look ragged; a manual pass tightens the visual result.

Troubleshooting

Nothing happens when I double-click. First check that you are actually on the boundary between two header letters, not inside a header cell. Then confirm the columns are selected. If both are true and it still ignores you, use Home > Format > AutoFit Column Width, which forces the calculation.

One column stays impossibly wide. Somewhere in it is a very long value, often a pasted comment, a formula result or trailing spaces. Find it, shorten it, or clear the extra spaces with TRIM in a helper column. There is no setting that caps autofit width.

Text is still cut off after autofit. The cell may contain a line break or wrapped text that needs the row height changed, not the column. Select the rows and double-click a row boundary. If the cell is merged, unmerge it first.

Columns look right but print cuts off. That is a page setup issue, not a width issue. Set the print area, choose Fit All Columns on One Page under Page Layout, and set orientation to landscape if the table is wide.

The sheet has many hidden columns. Selecting a range of visible columns does not include hidden ones, so autofit will not touch them. Unhide the columns (select the surrounding headers, right-click, choose Unhide), autofit, then hide them again if needed.

Frequently Asked Questions

Can I autofit all columns at once?

Yes. Click the box at the top-left corner of the grid to select the whole sheet, then double-click any boundary in the column header row. Every column is resized to its widest entry.

Why does autofit ignore my merged cells?

Excel does not measure merged cells when calculating widths. Unmerge them, autofit, then remerge if needed for the layout.

Does autofit work on Excel for the web?

Yes, on selected columns, though the double-click on header boundaries is less consistent across browsers. The Home > Format > AutoFit Column Width command is the dependable route.

How do I stop a column from getting too wide?

Shorten the outlier cell, or drag the boundary to a fixed width. Autofit always uses the widest cell, so there is no built-in maximum.

Can I autofit with only the keyboard?

Yes. Select the columns, then use the Format menu under the Home tab to choose AutoFit Column Width. On Mac, use Format > Columns > AutoFit Selection.

Why doesn't autofit include hidden rows?

Filtered-out rows are skipped in the calculation. Clear the filter, autofit, and reapply the filter afterwards.