How to Fix Excel AutoFit Row Height Not Working in Merged Cells
Question details
Users are unable to use the AutoFit Row Height feature when text is wrapped inside merged cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Applying wrapped text to merged cells and expecting the row height to expand automatically to fit the content.
- Observed behavior
- The row height remains completely unchanged, causing parts of the wrapped text to be hidden from view.
Understand that the inability to AutoFit row heights in merged cells is a standard, expected behavior in Excel rather than a software bug. Reviewing your worksheet layout to minimize merged cells is highly recommended.
Unmerge Cells and Use 'Center Across Selection'
This is the best practice for horizontal headers, allowing AutoFit to function normally without losing the visual centering effect of merged cells.
By replacing merged cells with 'Center Across Selection', you avoid the formatting limitations of merging while keeping the exact same visual layout.
Select the problematic merged cells and click the 'Merge & Center' button on the Home tab to unmerge them.
Keep the same cells selected and press 'Ctrl + 1' on your keyboard to open the Format Cells dialog box.
Navigate to the 'Alignment' tab. Under the 'Text alignment' section, click the 'Horizontal' drop-down menu and select 'Center Across Selection', then click OK.
Double-click the bottom boundary of the row heading on the left side of the screen. The row will now automatically adjust its height to fit the wrapped text.

Manually Adjust the Row Height
If you absolutely must keep the cells merged, manually dragging the row boundary is the most direct way to reveal the hidden text.
Submit Feedback to the Excel Community
Since this is an expected behavior, you can formally request Microsoft to change how Excel handles AutoFit in merged cells.
Easily Manage Cell Layouts with WPS Spreadsheet
WPS Office provides highly intuitive formatting tools to handle cell layouts, unmerging, and row height adjustments, ensuring your data is always presented clearly without frustrating limitations.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your existing workbook containing the merged cells.
- 2. Unmerge Cells: Select the merged cell, go to the Home tab, and click the 'Merge and Center' button to separate the cells.
- 3. Apply Alignment: Right-click the cells, select 'Format Cells', navigate to the Alignment tab, and choose 'Center Across Selection' from the Horizontal alignment options.

Frequently Asked Questions
Why doesn't AutoFit work on merged cells in Excel?
Microsoft programmed Excel this way because calculating the required row height for wrapped text spread across multiple columns creates logical layout conflicts, especially if different columns have varying widths. It is considered an intended software behavior.
Can a VBA macro automatically fit row heights for merged cells?
Yes, you can write a custom VBA macro that calculates the total text length and column widths to mathematically adjust the row height. However, this requires enabling macros and saving your file as an Excel Macro-Enabled Workbook (.xlsm).
Is there a keyboard shortcut to AutoFit row height?
Yes. Once you have unmerged the cells or applied 'Center Across Selection', you can select the row and press Alt, followed by H, O, and A sequentially to trigger the AutoFit Row Height command instantly.




