Fix Excel Cell Formatting Changes and Long Text Opening in the Middle
Question details
The user is experiencing unexpected cell formatting, extra blank rows, and long text displaying from the middle of the cell after upgrading to Microsoft 365.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Working with long text in cells or running a macro-formatted issue list after a software upgrade.
- Observed behavior
- Extra blank rows appear in the spreadsheet, and long cell contents display from the middle of the text instead of the top.
Before troubleshooting, save a backup copy of your workbook. If the issue is occurring in a macro-enabled workbook, temporarily disable macros to determine if the formatting glitch is caused by the VBA code or standard cell settings.
Remove Embedded Line Breaks Using Find and Replace
Eliminate hidden line breaks in your data that cause extra blank rows and distorted vertical text alignment.
Extra blank rows and awkward text positioning are frequently caused by invisible line break characters embedded within the cell data. Removing them universally resets the spacing.
Highlight the specific cells, columns, or the entire worksheet that is displaying formatting issues.
Press Ctrl + H on your keyboard to open the Find and Replace dialog box.
Click into the 'Find what' box and press Ctrl + J. You will not see a character appear, but a tiny blinking dot may indicate the invisible line break has been registered. Leave the 'Replace with' box completely empty.
Click 'Replace All' to instantly strip all line breaks from the selected cells, which will consolidate your text and remove the blank rows.

Adjust Cell Alignment and Wrap Text Settings
Fix long text opening in the middle by resetting the vertical alignment and Wrap Text options.
Inspect and Update Macro Formatting Commands
If the formatting issue returns immediately after running a macro, the VBA code may need updating for Microsoft 365 compatibility.
How to Fix Cell Formatting and Alignment in WPS Spreadsheet
WPS Spreadsheet offers a highly compatible and intuitive interface to quickly adjust cell alignment, manage long text, and clean up line breaks without unexpected formatting glitches.
- 1. Open your workbook in WPS: Launch WPS Spreadsheet and open the file experiencing text alignment or extra row issues.
- 2. Remove hidden line breaks: Press Ctrl + H to open Find and Replace. Click the 'Find what' box, press Ctrl + J to insert a line break, and click 'Replace All'.
- 3. Adjust vertical alignment: Highlight the affected cells, navigate to the Home tab, and select 'Top Align' so your long text starts natively from the top.
- 4. Manage Wrap Text and Row Height: In the Home tab, toggle 'Wrap Text' on, then double-click the boundary below the row number to AutoFit the row height instantly.

Frequently Asked Questions
Why does my text start in the middle of the Excel cell?
This happens when the cell's vertical alignment is set to 'Middle Align' or 'Bottom Align' while the row height is significantly larger than the text. Changing the vertical alignment to 'Top Align' via the Home tab will force the text to start at the top edge of the cell.
How do I remove hidden line breaks in Excel cells?
You can quickly remove them using the Find and Replace tool. Press Ctrl + H to open the dialog, click into the 'Find what' field, press Ctrl + J to input an invisible line break character, leave the 'Replace with' field completely blank, and click Replace All.
Can macro updates in Microsoft 365 affect cell formatting?
Yes. Upgrading to Microsoft 365 can occasionally alter how legacy VBA macros interpret legacy commands for row heights, text wrapping, and alignment. This can result in unexpected blank rows or distorted text alignment when an older macro is executed in the newer environment.
How do I automatically fit row heights for wrapped long text?
Select the rows you want to adjust, navigate to the Home tab, click on 'Format' in the Cells group, and select 'AutoFit Row Height'. Alternatively, you can double-click the line separating the row numbers on the left-hand side of the sheet.




