In Excel for Windows and Mac, row height autofit runs through Home > Format > AutoFit Row Height, or by double-clicking the bottom border of the row header. Select the rows you want first, then use either method: Excel measures the wrapped or enlarged text in the row and expands the height so nothing is cut off. On Excel for the web, the double-click shortcut works the same way, while the Format menu route also exists under the Home tab. One catching point up front: autofit only widens a row to fit what is actually in its cells, so if text is not wrapping, a single long line of text in one cell keeps the row at the default height.
Menu labels can differ slightly by Excel version, device and region, so if a name below does not match exactly, look for the nearest equivalent.
What You'll Need
- Excel for Windows, Mac or the web, with the workbook open.
- The rows you want to resize selected, if you only want some of them changed (you can skip this and resize the whole sheet instead).
- Cells that actually contain more content than the row can show, such as wrapped text or a larger font, otherwise autofit will look like it did nothing.
- Sheet protection turned off, since protected sheets block formatting changes.
Step-by-Step
- Open the worksheet that holds the rows you want to resize. Click the sheet tab at the bottom if you need to switch sheets.
- Choose which rows to resize. To do a single row, click the row number on the left so the whole row highlight appears. To do several, drag across the row numbers, or hold the Shift key and click the first and last row number to select the range. To do every row on the sheet, click the small triangle in the corner where the row numbers meet the column letters and press Ctrl+A or Command+A.
- Make sure the text is set to wrap, if wrapping is what you want. With the cells selected, go to Home > Wrap Text. Autofit measures the height needed for wrapped text, so a single unbroken line will not grow.
- Use the menu route: go to the Home tab, click Format in the Cells group, then choose AutoFit Row Height. The rows you selected snap to the smallest height that shows all their content.
- Or use the mouse route: move the pointer to the boundary line between two row numbers on the left edge until the cursor becomes a two-headed arrow, then double-click. This fits the current row, or every selected row, to its contents.
- On a Mac, the same two methods exist. Home > Format > AutoFit Row Height is in the ribbon, and double-clicking the row boundary works identically.
- To autofit every row in the workbook at once, select all sheets first (right-click a sheet tab and choose Select All Sheets), then apply the Format command once.
- Check the result. If a row still clips its text, that is your signal that a cell is not wrapping or that the row height was set manually. Widen the row by hand or reapply autofit after enabling Wrap Text.
Common Mistakes
Expecting autofit to widen columns. Row height and column width are separate. Autofit Row Height only changes height, and the matching command for width is AutoFit Column Width. If your text spills sideways into neighbouring empty cells, you want Wrap Text plus autofit, or column autofit, not the row command alone.
Applying it to a merged cell. Excel does not autofit the height of merged cells through the Format menu. Merged ranges ignore the automatic measurement, so a merged header row often needs its height set by dragging the row boundary or by typing a value in the row height box.
Leaving the text set to "shrink to fit." If alignment settings shrink the text to the cell, autofit has nothing to expand for, because the content is already considered to fit. Turn Shrink to Fit off in Format Cells > Alignment and turn Wrap Text on to see the difference.
Autofitting one row and assuming the rest follow. If you only have one row selected, only that row changes. Select all rows, or click the corner triangle first.
Forgetting that hidden rows and filtered rows behave differently. Autofit applies to hidden rows but they stay hidden, so the change is invisible until you unhide them. Unhide first if you want to see the result.
Tips
Set a fixed row height when a sheet is for printing and you want predictable page breaks. Home > Format > Row Height lets you type an exact value in points, which is more repeatable than dragging.
Text automatically wraps when a row height is set manually, even if Wrap Text is not enabled, so a fixed height and autofit can produce different-looking sheets. Pick one approach for the whole sheet and stick with it.
Use the Format Painter to copy row heights and column widths to other rows: select a row that looks right, click Format Painter on the Home tab, then click the target row number.
On the web version, autofit is available but some appearance details render slightly differently from the desktop app. Save and reopen in the desktop app if a row looks right in one place and wrong in the other.
If a table is an official Excel Table (Insert > Table), rows still autofit normally, but adding a filter or a slicer changes how the sheet scrolls, not the heights. Reapply autofit after you resize or re-wrap anything.
Troubleshooting
Nothing happens at all. Confirm the sheet is not protected (Review > Unprotect Sheet). Protected sheets block formatting, and you will need the password the file was protected with.
The row grew but text is still cut off. Check Wrap Text and check that the cell is not merged. Also look at the font size, because very large fonts in a shallow row can clip until the height is set manually.
Double-click does nothing. Make sure you are on the boundary line between row numbers, not inside a cell, and that you are in the row header area on the left, not the column header area on top.
The whole sheet looks wrong after autofit. Press Ctrl+Z (Command+Z on Mac) to undo. Autofit shrinks tall rows as well as growing short ones, so a sheet with deliberately tall rows will collapse. Reapply fixed heights to those rows afterwards.
A file from someone else will not autofit. Rows may have manual heights stored in the file, or hidden rows may be involved. Select all, then use Format > Row Height and enter a value to reset, before trying autofit again.
Autofit does not stick after reopening. Confirm you saved the workbook, and check whether an external workbook or add-in is reformatting the sheet on open. Open the file in the desktop app rather than the web version to rule out rendering differences.
Frequently Asked Questions
Where is autofit row height in Excel?
It is on the Home tab under Format > AutoFit Row Height, in the Cells group. The double-click on the row boundary is the faster equivalent.
Does autofit row height work on merged cells?
No, merged cells do not autofit through the menu command. Set the height manually by dragging the row boundary or typing a value in Format > Row Height.
Why does autofit not make my row taller for long text?
The text is probably not wrapping. Turn on Home > Wrap Text, or the row will keep its default height because Excel treats a single long line as fitting.
Can I autofit all rows at once?
Yes. Select every row by clicking the corner triangle, then choose Format > AutoFit Row Height. With multiple sheets selected, it applies to all of them.
Does autofit row height also change columns?
No. Row height and column width are separate commands; use AutoFit Column Width for widths.
Is autofit available in Excel for the web?
Yes, both the Format menu command and the double-click shortcut are available there, though exact layout can differ slightly from the desktop app.