Excel: Fit Content to Cell (AutoFit & Wrap Text)
In this article
Yes, Excel can resize cells to fit their contents automatically. The quickest way is to select the cells, then go to Home > Cells > Format > AutoFit Column Width (and AutoFit Row Height for rows), or simply double-click the border between column letters. Alternatively, wrapping text inside the cell keeps the column size fixed and grows the row instead. Both take a few seconds and work in Excel for Windows, Mac, and the web version.
What You'll Need
- A spreadsheet with text that is cut off, spilling over, or squeezed into narrow columns
- Excel on desktop (Windows or Mac), or Excel for the web in a browser
- No add-ins or special settings required; everything below uses built-in ribbon commands
Step-by-Step
- Open your spreadsheet in Excel and select the column or columns you want to resize. Click a column letter (for example, the B header) to select one column, or drag across several letters to select multiple.
- On the ribbon, click the Home tab, then in the Cells group click Format. Note that labels can differ slightly between Excel versions and platforms, but these commands exist in all current versions.
- Choose AutoFit Column Width. Each selected column instantly widens or narrows to fit its longest entry.
- To resize rows the same way, select the row numbers, return to Home > Cells > Format, and choose AutoFit Row Height.
- Faster alternative: hover your cursor over the right edge of a column letter until it becomes a double-headed arrow, then double-click. That column snaps to fit its contents. Drag the edge instead if you want manual control.
- To fit everything at once, click the Select All triangle in the top-left corner of the sheet (above row 1 and left of column A), then apply AutoFit Column Width.
- If you would rather keep columns at their current width and wrap long text onto multiple lines instead, select the cells and click Wrap Text on the Home tab (Alignment group). The row height grows to show the full text.
- To shrink text to fit instead of resizing the cell, press Ctrl+1 (or right-click and choose Format Cells), go to the Alignment tab, and under Text control tick Shrink to fit. The font size scales down so the entry fits the existing cell.
Common Mistakes
- Auto-fitting only the cell with the problem instead of the whole column; AutoFit always applies to entire columns or rows, so select the header.
- Merged cells: AutoFit does not work on merged cells. Excel cannot measure merged content, so unmerge first (Home > Merge & Center) or resize manually.
- Expecting Wrap Text and Shrink to fit to work together; they are mutually exclusive, and enabling one disables the other.
- Forgetting that AutoFit reads the longest unbroken entry, so one very long word or URL can make a column extremely wide.
- Applying AutoFit before pasting data, then wondering why new, longer entries are cut off again. Re-run it after the paste.
Tips
- Keyboard shortcut for Format Cells is Ctrl+1; the Alignment tab is where Wrap Text and Shrink to fit live if you prefer dialog controls.
- Double-clicking the bottom edge of a row number auto-fits that row's height, mirroring the column trick.
- To set a fixed width for several columns at once, select them, drag one border, and all selected columns match.
- For date or number columns showing ######, widening the column or Shrink to fit fixes the display; the underlying value is untouched.
- After wrapping text, AutoFit Row Height reveals any lines hidden by a manually shortened row.
Troubleshooting
If AutoFit does not change anything, check whether the cells are merged; that is the most common cause. Unmerge, autofit, then re-merge and widen manually if needed. If a column became absurdly wide, one entry contains a long unbroken string; edit it, add spaces, or use Wrap Text with a fixed width instead. If wrapped text is still hidden, the row height was set manually; select the rows and run AutoFit Row Height. If text still spills despite Wrap Text being on, confirm you selected the correct cells and that the row is not locked at a fixed height. In Excel for the web, the same commands sit on the Home tab, but if a row refuses to resize, try the desktop app, which handles height recalculation more reliably. If ###### persists after widening, the column is formatted as a number or date with too little space; widen it further or reduce the font size.
Frequently Asked Questions
What is the fastest way to fit content to a cell in Excel?
Double-click the right border of the column letter. The column instantly resizes to its longest entry.
Does AutoFit work on merged cells?
No. Excel cannot auto-fit merged cells, so you must widen the merged area by dragging the column border manually.
How do I fit text without changing column width?
Use Wrap Text to display the entry on multiple lines, or Shrink to fit to reduce the font size inside the existing cell.
Why does my column show ###### instead of a number or date?
The column is too narrow for the formatted value. Widen the column or apply Shrink to fit; the data itself is not damaged.
Can I autofit an entire worksheet at once?
Yes. Click Select All (the triangle above row 1), then Home > Cells > Format > AutoFit Column Width.
Is there a keyboard shortcut for AutoFit?
There is no single default key for AutoFit Column Width. The Alt key ribbon shortcuts work on Windows, but the double-click border trick or the Home > Format menu is quicker on both Windows and Mac.