In this article, we’ll discuss five methods to wrap text in merged cells. Suppose we have the dataset below containing five items and item descriptions, where the item descriptions have long text that extends beyond the border of the cells. The cells of Columns C and D are merged together. We’ll wrap the text in these cells in Excel.
Method 1 – Using the Format Cells Option to Wrap Text in Merged Cells
In the below dataset, all the text in the Item Description column does not fit within the column width. We’ll fix this by using the Format Cells option to wrap the text.
Steps:
- Select the cell, right-click on it and select Format Cells from the context menu.
- In the Format Cells dialog box that opens, go to Alignment and check Wrap Text.
- Click on OK.
The text is wrapped in the cells, and all of it is now displayed within the cell borders.
Method 2 – Using the Home Tab to Wrap Text in Merged Cells
Steps:
- Select the cells in which the text should be wrapped and go to the Home tab.
- From the Alignment section, select Wrap Text.
The output is as follows:
Method 3 – Using a Keyboard Shortcut to Wrap Text in Merged Cells
We can also wrap text using a Keyboard Shortcut in merged cells. Simply select the relevant cells and press ALT+H+W. As a result, the following output is returned:
Method 4 – Using Line Breaks To Wrap Text in Merged Cells in Excel
Another simple way to wrap the text in merged cells is to use the Line Break manually. Just click on the relevant cell, put the cursor on the place to insert a line break, and press ALT+ENTER.
After repeating the process to insert all the required Line Breaks, the following output is returned:
Method 5 – Using Excel VBA to Wrap Text in Merged Cells
Finally, we can also wrap text with VBA in merged cells in Excel.
Steps:
- Open the Visual Basic Editor by pressing ALT+F11 (or go to the Developer tab and select Visual Basic).
- In the editor, click Insert and select Module.
- Enter the following code in the module window that opens:
Sub VBA_wrap_text_merged()
Range("C5:D9").WrapText = True
End Sub
- To run the code, press F5 or select Run, then click on Run Sub/UserFrom.
The following output is returned:
Things to Remember
✎ If you are using the keyboard shortcut, remember to press the keys one by one, not simultaneously.
✎ Adjust the row height as required after following each method.
Download Practice Workbook
Related Articles
- How to Wrap Text across Multiple Cells without Merging in Excel
- Excel Auto Fit Row Height for Wrap Text
- How to Write a Paragraph in Excel Cell
- [Solution:] Excel Wrap Text Not Working for Merged Cell
- VBA to Wrap Text for Entire Sheet in Excel
<< Go Back to Wrap Text | Text Formatting | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!