How to Autofit Every Row in Excel (Step-by-Step)
In this article
To autofit every row in Excel at once, select all rows (Ctrl+A twice, or click the corner triangle above row 1), then go to Home > Format > AutoFit Row Height. On Mac, use Format > AutoFit Row Height from the same menu. This makes each row tall enough to show its tallest wrapped or multi-line cell without cutting off text. If rows still look wrong, the usual culprits are merged cells, manual row heights, or wrap text being off.
What You'll Need
- Microsoft Excel for Windows or Mac (desktop app). The steps below are for the desktop version; Excel for the web has a similar Format menu but fewer options.
- A spreadsheet with at least one row containing text that is cut off or overlapping.
- Basic familiarity with selecting rows and using the Home tab.
Step-by-Step
- Select the entire sheet. Click the small triangle in the top-left corner where the row numbers meet the column letters. Alternatively, press Ctrl+A (Windows) or Command+A (Mac) once to select the current region, then again to select the whole sheet. All cells should be highlighted.
- Open the Format menu. On the Home tab, find the Cells group and click Format (it looks like a grid with a dropdown arrow). On Mac, the Format button is in the same Cells group on the Home tab.
- Choose AutoFit Row Height. In the dropdown, under Cell Size, click AutoFit Row Height. Excel will resize every row to fit its content. If you only want to autofit specific rows, select those rows first (click the row number and drag, or Ctrl+click each row number) and then use the same command.
- Check the result. Scroll through your sheet. Rows with wrapped text should now show all lines. If some rows still look too short, see Troubleshooting below.
- Optional: also autofit columns. With the whole sheet still selected, repeat the Format menu and choose AutoFit Column Width. This widens columns so text isn't cut off horizontally. Note that autofitting columns can make very wide columns if you have long text; you may prefer to set a fixed width and use Wrap Text instead.
Common Mistakes
- Not selecting all rows. If you only click one cell, AutoFit Row Height applies only to that row. Make sure the entire sheet or the specific rows are selected.
- Forgetting to turn on Wrap Text. AutoFit Row Height only increases height when the cell content needs multiple lines. If Wrap Text is off, Excel may not expand the row because the text spills into adjacent empty cells. Turn on Wrap Text (Home > Wrap Text) before autofitting.
- Merged cells block autofit. Excel cannot automatically adjust row height for merged cells. You'll need to manually drag the row border or unmerge the cells.
- Manual row height overrides autofit. If a row has a manually set height, AutoFit may not work until you reset it. Select the row, go to Format > Row Height, and set it to a smaller value or clear the custom height by choosing AutoFit again.
- Using the wrong command. AutoFit Row Height is different from AutoFit Column Width. Make sure you pick the row option.
Tips
- To autofit rows quickly, double-click the boundary between two row numbers. For example, double-click the line under row 1 to autofit row 1. To do many rows at once, select them and double-click any row boundary.
- If you want a consistent look, set a default row height for the whole sheet (Format > Default Row Height) and then autofit only rows that need extra space.
- Use keyboard shortcuts: Alt+H+O+A (Windows) opens the Format menu and selects AutoFit Row Height. On Mac, there is no default shortcut, but you can add one via System Settings > Keyboard > Shortcuts.
- Autofit works on hidden rows too, but they remain hidden. Unhide rows first if you need to see the result.
- If your data is in a table (ListObject), autofit still works, but row heights may be controlled by the table style. You can override by selecting the table rows and using AutoFit.
Troubleshooting
- Rows don't resize. Check for merged cells. Excel cannot autofit merged cells. Unmerge them (Home > Merge & Center) or manually adjust the row height.
- Text is still cut off. Ensure Wrap Text is enabled for those cells. Also check that the row height is not set to a fixed value: select the row, go to Format > Row Height, and clear the value (or set it to a smaller number) then autofit again.
- Autofit makes rows too tall. This happens when a cell contains a lot of text or a line break. You can manually set a maximum height or reduce the text. Alternatively, use Shrink to Fit (Format Cells > Alignment) to fit text in a fixed row height.
- Only some rows change. Make sure you selected all rows before using AutoFit. If you used Ctrl+A, it may have selected only the current region; press Ctrl+A again to select the whole sheet.
- Excel for the web behaves differently. The web version has AutoFit Row Height under Format > AutoFit Row Height, but it may not work with merged cells or certain formatting. For full control, use the desktop app.
Frequently Asked Questions
Can I autofit all rows at once in Excel?
Yes. Select the entire sheet (click the corner triangle or press Ctrl+A twice), then go to Home > Format > AutoFit Row Height. All rows will resize to fit their content.
Why doesn't AutoFit Row Height work on some rows?
The most common reasons are merged cells, manual row height settings, or Wrap Text being turned off. Check those first.
Is there a keyboard shortcut for autofit row height?
In Windows Excel, you can use Alt+H+O+A to open the Format menu and choose AutoFit Row Height. On Mac, there is no built-in shortcut, but you can create one.
Does autofit work on hidden rows?
Yes, but the rows remain hidden. Unhide them to see the resized rows.
Can I autofit only specific rows?
Yes. Select the rows you want (click and drag row numbers, or Ctrl+click each), then use Format > AutoFit Row Height.
What's the difference between autofit row height and autofit column width?
Autofit Row Height adjusts the height of rows to fit wrapped text; AutoFit Column Width adjusts the width of columns to fit the longest entry. They are separate commands.