Fix Excel AutoFit Row Height Not Working with INDEX Formula Results in WPS Office
Question details
The user needs rows to expand when a WPS or Excel formula such as INDEX or XMATCH returns wrapped, multiline text that is cut off.
- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- A spreadsheet uses INDEX or XMATCH formulas that return multiline text, and Wrap Text is enabled but row height does not expand enough.
- Observed behavior
- AutoFit Row Height fails to calculate the required height, leaving wrapped formula results clipped or overlapping.
Open the worksheet and confirm that Wrap Text is enabled on the cells containing the INDEX or XMATCH results, and note whether the returned text contains manual line breaks or exceeds the current column width.
Manually Set Row Height After Enabling Wrap Text
Use this when AutoFit does not expand rows containing wrapped INDEX or XMATCH formula results.
WPS Spreadsheets inherits Excel's behavior: AutoFit may not reliably measure row height for formula-returned multi-line text, so a fixed manual height is the most dependable fix.
Click the row numbers on the left to select all rows that contain wrapped INDEX or XMATCH results.
On the Home tab, in the Alignment group, click Wrap Text so all returned lines are allowed to wrap inside the cell.
Go to Home > Cells > Format > Row Height.
Type a height that fits the visible lines, such as 15 points multiplied by the number of lines, then click OK.
If any text is still clipped, repeat the Row Height command and increase the value until every line is fully visible.
Use AutoFit Column Width as a Diagnostic Check
Use this to quickly confirm whether the issue is row measurement or column width before applying a manual row height.
Fix AutoFit Row Height for INDEX Formula Results in WPS Office Spreadsheets
Open the workbook in WPS Office Spreadsheets, enable Wrap Text, and set a fixed row height so INDEX or XMATCH formula results remain fully visible. WPS Office keeps Excel formulas and formatting intact while offering a free, familiar spreadsheet experience.
- 1. Open the workbook in WPS Spreadsheets: Launch WPS Office, click Spreadsheets, and open the .xlsx file that contains the INDEX or XMATCH results.
- 2. Select the clipped rows: Click the row numbers to select every row where wrapped formula text is not fully visible.
- 3. Enable Wrap Text: On the Home tab, in the Alignment group, click Wrap Text to keep the returned text inside the cell.
- 4. Set a fixed row height: Go to Home > Cells > Format > Row Height, enter a height that fits the wrapped lines, and click OK.
- 5. Save with Excel compatibility: Save the file as .xlsx to preserve formulas and formatting when reopening in Microsoft Excel.

Frequently Asked Questions
Why doesn't AutoFit row height work when my formula returns wrapped text?
AutoFit can misread the required height for formula results that contain line breaks or long multiline text. Enable Wrap Text and then set a manual Row Height from Home > Cells > Format > Row Height.
How do I manually set row height for INDEX or XMATCH results in WPS Spreadsheets?
Select the affected rows by clicking their row numbers, go to Home > Cells > Format > Row Height, enter a height based on the number of visible lines, and click OK.
Does WPS Spreadsheets support INDEX and XMATCH formulas from Excel?
Yes, WPS Spreadsheets supports INDEX and XMATCH formulas when opening .xlsx files. If the formula returns multiline text, use Wrap Text and a manual row height to display all lines.
Can AutoFit Column Width be used as a workaround?
Yes, temporarily disable Wrap Text, select the columns, go to Home > Cells > Format > AutoFit Column Width to check the column width, then re-enable Wrap Text and set row height manually.




