Excel can resize rows and columns to fit their contents automatically, and the quickest way is AutoFit: double-click the boundary line between two column headers (or row numbers) and Excel snaps that column or row to the widest or tallest cell it contains. For a whole sheet at once, select everything with Ctrl+A, then double-click any column boundary and any row boundary. For a more permanent fix, the Home tab, Format menu, and the right-click menu all include AutoFit Row Height and AutoFit Column Width commands, and you can also turn on wrap text so tall entries stay inside the cell instead of spilling over.

What You'll Need

  • Excel for Windows or Mac (desktop). Excel for the web has a more limited set of resize options; the steps below note where it differs.
  • A workbook with at least some data entered in the cells you want to resize.
  • Basic comfort with selecting cells, columns and rows using the column letters and row numbers.

Step-by-Step

  1. Select the columns you want to resize. Click a single column letter (for example, C) to select one column, drag across several letters to select a range, or click the small triangle at the top-left corner of the grid (above the row numbers and left of the column letters) to select the entire sheet. Hold Ctrl and click individual letters to select non-adjacent columns.
  2. Double-click the boundary line. Hover over the right edge of a selected column letter until the pointer becomes a thin line with a left-right arrow, then double-click. Every selected column resizes to fit its own longest entry. If you only want one column adjusted, you can double-click its boundary without selecting it first.
  3. Repeat the same idea for rows. Select the row numbers you want to change, hover over the boundary line below one of the selected row numbers, and double-click. All selected rows will then size to fit their tallest content, which matters when a cell contains multiple lines of wrapped text or an enlarged font.
  4. Use the ribbon command instead. With the rows or columns selected, go to the Home tab, find the Cells group, click Format, then choose AutoFit Column Width or AutoFit Row Height from the menu. This does exactly the same thing as double-clicking but is easier to hit when your mouse is imprecise. Menu labels can differ slightly by Excel version, device and language.
  5. Try the right-click menu. Right-click the selected column letters and choose Column Width or right-click the selected row numbers and choose Row Height; in some versions the AutoFit option also appears directly in this menu. If you see only the numeric width or height dialog, cancel it and use the ribbon method above.
  6. Turn on Wrap Text for long entries. Select the cells, then click Wrap Text in the Alignment group on the Home tab. The text now breaks onto extra lines inside the cell, and AutoFit Row Height then makes the row tall enough to show every line. Without wrap, long text simply runs into neighbouring empty cells or gets cut off at the border.
  7. Set a fixed size when you want consistency. If AutoFit makes columns unevenly wide, select them and use Home > Format > Column Width, type the same number for each, and click OK. A width of about 8.43 is Excel's default on a standard blank workbook, but the exact figure depends on your font and settings, so it is safer to copy the width from a column you already like.
  8. Check merged cells and hidden rows. A column containing a merged cell will not shrink below the merged range's width, and AutoFit ignores content in hidden rows or columns. Unmerge or unhide first if a column refuses to behave.
  9. Save the result. Press Ctrl+S (Command+S on Mac) so the new sizes are stored with the file. Column widths and row heights are saved per sheet, so other sheets in the workbook keep their own settings.

Common Mistakes

  • Double-clicking without selecting first. Excel then adjusts only the one column you clicked, which leaves the rest of the sheet ragged. Select the whole range first, then double-click any boundary inside the selection.
  • Expecting AutoFit to handle wrapped text automatically. AutoFit Row Height only works when Wrap Text is on. If rows stay stubbornly short, check the Alignment group on the Home tab.
  • Leaving a very long text string in one cell. AutoFit sizes a column to the longest entry, so one stray sentence can make a column absurdly wide. Move long notes to a separate column or wrap the text instead.
  • Forgetting that merged cells block resizing. A merged range sets a floor for the column width; AutoFit cannot shrink past it.
  • Assuming it updates forever. AutoFit is a one-time action, not a live setting. Add longer data later and you need to run it again.

Tips

  • Use Alt+H, then O, then I to run AutoFit Column Width and Alt+H, then O, then A for AutoFit Row Height using the keyboard only.
  • To make AutoFit automatic in a practical sense, leave Wrap Text on for data columns and rerun AutoFit Row Height after adding content; or record a short macro that selects the used range and applies both commands, then run it from the ribbon.
  • Select all cells with Ctrl+A and apply a uniform default row height first, then AutoFit only the columns you want to change. This keeps the sheet tidy without a patchwork of sizes.
  • AutoFit never shrinks below the smallest width needed for the header text, so short column letters can appear crowded if your headings are long. Consider shortening headers.
  • Excel for the web supports double-click AutoFit on column boundaries, but its formatting menu is smaller than the desktop version, so complex resizing is easier on Windows or Mac.

Troubleshooting

  • Nothing happens when you double-click. Make sure you are on the boundary line between two column letters, not inside the letter itself. The cursor should change shape. If it does not, your pointer is slightly off; move it one or two pixels.
  • A column stays too wide. There is likely a long entry, a merged cell, or a hidden column inside the selection. Unmerge, unhide, and shorten or wrap the long text, then try again.
  • A row stays too short. Turn on Wrap Text, confirm the row height is not manually locked at a fixed number, and check that the cell does not contain an object or comment pushing the content.
  • The whole sheet is now huge. Undo with Ctrl+Z, then select the sheet and set a reasonable default with Home > Format > Default Width or apply a fixed Column Width to all columns.
  • The layout looks different on another computer. Row heights and widths depend on the font installed and on display scaling. Sheet sizes are stored with the file, but text metrics can shift when the font is missing, so stick to common fonts such as Calibri or Arial.

Frequently Asked Questions

Does Excel resize cells automatically as I type?

No. AutoFit is a command you trigger; Excel does not continuously resize. If you want it to feel automatic, wrap text and rerun AutoFit Row Height after editing.

Can I AutoFit only one column without affecting others?

Yes. Double-click the boundary to the right of that single column letter with nothing else selected.

Why is AutoFit greyed out?

It is usually because the sheet is protected or the workbook is in a mode that restricts formatting. Unprotect the sheet from the Review tab first.

Does AutoFit work on merged cells?

Only up to the merged range's own width. AutoFit cannot shrink a column narrower than the merged cell spans.

How do I AutoFit every sheet in a workbook?

Select the sheet tabs while holding Ctrl, then apply the commands; or group the sheets first. Alternatively, use a short macro that loops through all sheets.

Does AutoFit change my print layout?

It can. Wider columns may push content onto extra pages, so review the print preview or set Fit to Page in the Page Layout tab after resizing.