logo
search
Formatting Issues

Fix Excel AutoFit Row Height Not Adjusting to Formula Results

Rana GarciaRana Garcia Oct 9, 2026 869 views

Question details

The user is unable to get the AutoFit row height feature to adjust automatically when a cell contains text generated by a formula.

Fix Excel AutoFit Row Height Not Adjusting to Formula Results
Product
Excel
Device & OS
not provided
Scenario
Attempting to auto-size row heights so that dynamic formula results with varying text lengths are fully visible without manual adjustment.
Observed behavior
The row height remains static or truncates the text, rather than expanding vertically to display the full formula result.
Before you start

Verify that the worksheet is not protected, as worksheet protection can lock cell formatting and prevent row heights from being adjusted.

Solution 1Recommended

Enable Wrap Text and Change Alignment to General

AutoFit requires 'Wrap Text' to be enabled and the horizontal alignment set to 'General' to properly calculate and adjust the row height for formula text.

When horizontal alignment is set to 'Fill' or 'Wrap Text' is disabled, Excel does not know it needs to expand vertically. If adjacent cells are empty, disabled wrap text causes the text to simply overflow horizontally. Fixing these two settings forces the row to expand downward based on the formula result.

1
Select the target cells

Highlight the specific cell or range of cells containing the formula results that are not displaying correctly.

2
Open Format Cells dialog

Right-click the selected cells and click 'Format Cells' from the context menu, or press the 'Ctrl + 1' keyboard shortcut.

3
Adjust Horizontal Alignment

Navigate to the 'Alignment' tab. Click the 'Horizontal' drop-down menu and select 'General'. Ensure it is not set to 'Fill'.

4
Enable Wrap Text

Under the 'Text control' section on the same tab, check the box next to 'Wrap text' and click 'OK'.

5
Trigger AutoFit

Move your cursor to the row header on the left side of the screen. Double-click the bottom boundary line of the affected row to automatically adjust the height.

Enable Wrap Text and Change Alignment to General
Tip: You can also quickly toggle 'Wrap Text' directly from the Home tab in the ribbon menu.
Seamless Data Formatting

Easily Format Cells and AutoFit Rows in WPS Spreadsheet

WPS Office provides a highly compatible and intuitive Spreadsheet tool that effortlessly handles complex formatting, formulas, and AutoFit functions to keep your data perfectly visible.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open your Excel workbook.
  2. 2. Select formula cells: Highlight the cells containing your formulas.
  3. 3. Apply Wrap Text: Click the 'Wrap Text' button located in the Home tab toolbar.
  4. 4. AutoFit Row Height: Go to Home > Format, then select 'AutoFit Row Height' to instantly expand the cells.
Fully compatible with Microsoft Excel (.xlsx, .xls) file formats and formulas.One-click AutoFit and text wrapping for long formula outputs.Lightweight, fast-loading, and completely free to use.
microsoft office alternative - wps office

Frequently Asked Questions

Why does AutoFit work on typed text but not formula results?

AutoFit sometimes fails to trigger automatically when formula outputs change dynamically in the background. You must ensure 'Wrap Text' is turned on and re-trigger AutoFit by double-clicking the row boundary so the cell calculates the new height based on the output.

Can merged cells affect AutoFit row height?

Yes, Excel's AutoFit feature generally does not work with merged cells. If your formula result is inside a merged cell, you will need to either manually adjust the row height or unmerge the cells to allow AutoFit to function properly.

Is there a keyboard shortcut to AutoFit row height?

Yes, select the row or rows you want to adjust, then press Alt + H, followed by O, and then A in sequence on your keyboard. This triggers the AutoFit Row Height command from the ribbon.