Formatting Issues

How to Fix Excel Cell Underline Extending Beyond Text in WPS Office

Elise WilliamsElise Williams Nov 13, 2026 868 views

Question details

The user wants to stop an underlined Excel cell from showing the underline across the entire cell width instead of only under the text.

How to Fix Excel Cell Underline Extending Beyond Text in WPS Office
Product
WPS Office Excel
Device & OS
not provided
Scenario
While formatting a WPS Office Excel worksheet, the user applies underline to a cell and wants the underline to match the actual text width rather than the cell boundary.
Observed behavior
The underline extends to the cell boundary instead of stopping under the characters.
Before you start

Open the workbook in WPS Office Excel, select the affected cell, and note whether the underline was applied to a specific cell or to an entire row or column. Then open Format Cells to check the current horizontal alignment before making changes.

Solution 1Recommended

Change the Horizontal Alignment to General or Left

Use this first when underlined text is using a distributed, justified, or fill alignment that spreads the content across the cell width.

Underline formatting normally follows the displayed characters. When Excel uses a stretched alignment, the underline can visually run to the cell edge even though the underline was applied only to the text. Changing the alignment restores the expected character-width underline.

1
Open the Format Cells dialog

Select the affected cell or range, right-click it, and choose Format Cells from the context menu.

2
Adjust the Horizontal alignment

In the Format Cells dialog, click the Alignment tab, open the Horizontal drop-down list, and select General, Left, or another suitable alignment.

3
Apply and verify

Click OK, then check whether the underline now stops under the text instead of extending to the cell boundary.

Change the Horizontal Alignment to General or Left
Result: The underline should now follow the text width instead of extending across the cell.
WPS Office Excel

Fix Underline Extending Beyond Text in WPS Office Excel

Use WPS Office Excel to correct cell alignment and clear row or column formatting so underlines appear only under the text. The familiar Excel-style interface makes it easy to update the workbook and save it in Microsoft Excel-compatible format.

  1. 1. Open the workbook in WPS Office Excel: Launch WPS Office Excel and open the worksheet where the cell underline extends beyond the text.
  2. 2. Check alignment in Format Cells: Select the affected cell or range, right-click and choose Format Cells, then click the Alignment tab and set Horizontal to General, Left, or Center.
  3. 3. Clear unwanted formatting if needed: If the underline still extends to the cell boundary, go to the Home tab, click Clear, and select Clear Formats.
  4. 4. Reapply underline to the text: Select the cell or highlight the text in the formula bar, then press Ctrl+U or click the Underline button on the Home tab.
  5. 5. Save the workbook: Click Save or press Ctrl+S to keep the corrected formatting.
Fixes the underline alignment issue without rebuilding the spreadsheetWorks with .xlsx and .xls files for Microsoft Excel compatibilityFree to download and use with a familiar ribbon interfaceLets you adjust Format Cells, alignment, and clear formatting in a few clicksPreserves the rest of the worksheet formatting while correcting only the affected cells
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel cell underline extend past the text?

Usually this happens because the horizontal alignment is set to Justify, Distributed, or Fill, or because underline formatting was applied to an entire row or column. Open Format Cells, go to the Alignment tab, and set Horizontal to General, Left, or Center.

How do I remove underline from only part of a cell?

Select the cell, click in the formula bar, highlight the specific characters, and then click Underline or press Ctrl+U. To remove underline from an entire row or column, select that row or column and clear formatting.

Does WPS Office Excel support the same underline formatting as Microsoft Excel?

Yes. WPS Office Excel supports common text formatting, including underline, and can open and edit .xlsx and .xls files with Microsoft Excel-compatible formatting.

How do I clear formatting from a whole row or column in WPS Excel?

Select the row or column, go to the Home tab, click Clear, and choose Clear Formats. Then reapply underline only to the intended cells.

Can I use a keyboard shortcut to underline text in WPS Office Excel?

Yes. Select the cell or highlight the text in the formula bar and press Ctrl+U.