Excel Automatic Cell Height: How to AutoFit Row Height
In this article
To make Excel automatically adjust cell height, use the AutoFit Row Height feature. The fastest way is to double-click the bottom boundary of the row header (the number on the left), or select the cells and go to Home > Format > AutoFit Row Height. This ensures that all text within a cell is visible without manual dragging.
Automatic cell height is essential for spreadsheets containing long strings of text, descriptions, or data imported from other sources. By default, Excel cells have a fixed height; if your text exceeds this height, it will either be cut off or overflow into the next cell. AutoFit dynamically resizes the row to match the tallest piece of content in that specific row.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- A spreadsheet containing data that is currently cut off or improperly spaced.
Step-by-Step
- Enable Wrap Text: Before Excel can automatically adjust the height of a cell for long text, the text must be set to wrap. Select the cells, columns, or rows you want to affect, and click the Wrap Text button located in the Alignment group on the Home tab. If Wrap Text is not enabled, Excel will try to expand the width of the cell rather than the height.
- Select the Target Rows:
- To adjust a single row, click the row number on the far left.
- To adjust multiple specific rows, hold the Ctrl key (Cmd on Mac) and click the desired row numbers.
- To adjust the entire worksheet, click the Select All button (the small triangle in the top-left corner where the row numbers and column letters meet).
- Apply AutoFit (Method A: The Mouse Shortcut): Hover your mouse cursor over the bottom boundary of the row header for the row you want to resize. Your cursor will change into a double-sided arrow. Double-click the boundary. Excel will instantly snap the row height to fit the content.
- Apply AutoFit (Method B: The Ribbon Menu): With the rows selected, navigate to the Home tab. In the Cells group, click Format. From the dropdown menu, select AutoFit Row Height.
- Verify the Results: Scroll through your data to ensure that no text is cut off at the bottom of the cells. If you add more text to a cell later, you will need to repeat the AutoFit process, as Excel does not continuously "live-resize" row heights as you type.
Common Mistakes
- Forgetting Wrap Text: This is the most common error. AutoFit Row Height only works for multi-line text if Wrap Text is turned on. Without it, Excel assumes the data should stay on one line.
- Merging Cells: AutoFit Row Height does not work on merged cells. If you have merged multiple cells into one large block and enabled Wrap Text, the AutoFit command will ignore that row. You must manually adjust the height for merged cells.
- Selecting Only the Cell: Users often try to double-click the cell border inside the grid. AutoFit only works when you double-click the border of the row header (the numbered area on the left).
- Hidden Rows: If you select the entire sheet and apply AutoFit, any hidden rows will remain hidden, but their height will be recalculated based on their content.
Tips
- Batch Processing: Instead of double-clicking every row individually, select the entire worksheet (Ctrl + A) and double-click any single row boundary to AutoFit every row in the document simultaneously.
- Consistency: If you want a professional look, avoid AutoFitting every single row if the differences in text length are minor. Instead, select all rows, right-click the row header, select Row Height, and enter a specific numerical value to keep them uniform.
- Column Width First: Always set your desired column width before applying AutoFit Row Height. Because the height depends on how much text is forced to wrap, changing the width after AutoFitting will make the row height inaccurate again.
Troubleshooting
If the row height is not changing or the text remains cut off, try these steps in order:
- Check for Merged Cells: Check if the cell is part of a merged group. If it is, unmerge the cells (Home > Merge & Center > Unmerge Cells) and try AutoFit again.
- Re-apply Wrap Text: Toggle Wrap Text off and then back on again to ensure the setting is active for that specific cell.
- Check for Manual Height Overrides: If you have manually dragged a row to a specific height, Excel sometimes treats this as a "fixed" height. Using the Format > AutoFit Row Height menu option usually overrides this.
- Inspect Font Size: Extremely large fonts or custom cell padding can sometimes cause AutoFit to miscalculate. Ensure your font size is consistent across the data set.
Frequently Asked Questions
Can Excel automatically adjust row height as I type?
No, Excel does not have a native "live" AutoFit feature that expands the row height in real-time as you enter text. You must apply the AutoFit command after the data has been entered.
Why is AutoFit Row Height greyed out?
This typically happens if the worksheet is protected. Go to the Review tab and select Unprotect Sheet to enable formatting options.
Does AutoFit Row Height work on Mac?
Yes, the process is identical on macOS. You can either double-click the row boundary in the header or use the Home > Format > AutoFit Row Height menu path.
Will AutoFit change my column width?
No. AutoFit Row Height only affects the vertical dimension of the cell. If you want to adjust the horizontal width, you must use AutoFit Column Width.
Can I use a keyboard shortcut for AutoFit Row Height?
While there isn't a single-key shortcut, you can use the Alt sequence on Windows: press Alt, then H, then O, then A. This navigates the Home > Format > AutoFit Row Height path.