What Is Wrap Text In Excel?
Wrap text is a function that wraps the content in a cell to fit within the defined cell in an Excel spreadsheet. The function formats lengthy text strings or data of a cell and displays the content in multiple lines within the cell instead of overlapping the adjacent cells. Wrap text in Excel improves the appearance of a spreadsheet and helps users create readable content. For example, consider the following table.
Let us assume the cells are left-aligned. Cell D2 and cell range D4:D10 display how a lengthy text string appears in the spreadsheet.
In cell D2, the content extends to the empty adjacent cells to the right. Depending on the alignment settings (left, center, or right), the data extends to the adjacent blank cells (to the right or left of the cell).
Also, based on the data alignment and presence of non-empty adjacent cells to the right and left of the cell with a text string, we can observe that the content is truncated at the specific cell borders.
In cell range D4:D10, the content in each cell is trimmed at the right since the adjacent cell range E4:E10 has data. Using the wrap text in Excel, we can arrange the content in multiple lines within the cells. This function ensures the content does not get cut or overlap adjacent cells.
In the following image, we have enabled the wrap text function in cell D2 and cell range D4:D10.
Thus, the function displays the data within the cell in multiple lines.
Table of contents
- What is Wrap Text in Excel?
- Wrap text in Excel wraps a cell’s text or data to fit within the cell, thus avoiding overlapping with the adjacent cells.
- One can enable or disable the Wrap Text format from a cell by selecting or unselecting the option from the Home tab or the Format Cells window. Alternatively, they can press the Alt + H + W keys as the shortcut or manually insert or remove line breaks in the cell content.
- If the wrap text command does not work, try to adjust the row height or column width, unmerge the merged cells, and alter the Horizontal Alignment setting in the Format Cells window as General.
How To Wrap Text In Excel?
Before applying the wrap text in Excel cell, it is essential to fix the appropriate cell width for the data to look more presentable. This is because the wrap text format automatically adjusts the specific cell’s row height to fit the content within the cell.
The different ways to enable wrapping text in an Excel spreadsheet are as follows:
1. Wrap Text Using the Home Tab
It is the most familiar way to use the wrap text in Excel.
Consider the table below. Column A displays the list of items at a department store of JC Penny, and column B shows their quantity (stock). However, the heading in cell A1, JC Penny Item List, is center-aligned and truncated on the borders.
Here, the aim is to wrap the text in cell A1 to make it presentable.
- Choose cell A1, as shown above, to wrap the text.
- Click on the Home Tab.
- Select Wrap Text under the Alignment group.
As soon as we click on Wrap Text, we can see the entire JC Penny Item List heading expanding to multiple lines within cell A1.
Likewise, we can format text strings in multiple cells or a table array using the wrap text function in just a click.
2. Wrap Text Using the “Format Cells” Window
Alternatively, we can enable wrap text in Excel spreadsheet from the Format Cells window.
For example, column A (Country_Code) lists countries in the following table, and column B (Currency_Code) denotes the country’s currencies. We have to wrap text in cell range A1:A11 and cell B1 as the content is not completely visible. Also, the content in the table array is left aligned.
The steps to execute the wrap text in Excel command available in the Format Cells window are as follows:
Step 1: Choose cell range A1:A11 and cell B1 to wrap the text. Right-click and select the Format Cells option as shown below.
Please Note: Alternatively, we can select the required cell range and press Ctrl + 1. The wrap text in excel shortcut is to open the Format Cells window.
Step 2: The Format Cells window pops up. Select the Wrap text option under the Alignment tab.
Step 3: Click OK to wrap the text in the selected cells.
In the above example, the content in cell range B2:B11 appears wrapped, even though the wrap text function is not enabled. It is because the column heading in cell B1 is wrapped. The function automatically adjusts the row height of cells in column B.
Although this method involves more steps than choosing the wrap text function from the Home tab, it is a time saver when we require other cell formatting changes, apart from text wrapping.
Please Note: Sometimes, when we select multiple cells and enable the wrap text command, we might observe the checkbox filled with a solid box. It indicates that the selected cells have varying wrap text formats. We can select the checkbox to apply the wrap text format on all selected cells.
3. Wrap Text Using The Keyboard Shortcut
We can activate the wrap text in the Excel option using the following shortcut method.
Step 1: Choose the cell where you need to wrap the text.
Step 2: Press Alt + H + W.
We can see that the text is wrapped in the selected cell.
We can select multiple cells or a cell range and use the Excel shortcut to wrap text in selected cells.
4.Wrap Text Using Line Breaks
Adding line breaks in a cell is another way to enable the wrap text format. Let us look at the following steps to understand how we can do that:
We choose cell B2 to wrap the text in the following example.
Step 2: To edit, we can press the F2 key or double-click on the cell. Position the cursor where we need to add the line break in the text.
We can also directly place the cursor in the Formula Bar at the required location in the text.
Step 3: Press Alt + Enter to add a line break in the text.
Step 4: Press Enter to see the wrapped text in cell B2.
We can add multiple line breaks by placing the cursor on the text string and pressing the Alt + Enter keys simultaneously. Then, click Enter key to see the wrapped text.
Step 5: Likewise, we will wrap the text in cells B3:B6. After aligning the text using the Home 🡪 Alignment, the output will be as below:
Please Note: In Excel, enabling the wrap text function is as easy as disabling the function.
Here is how you can remove wrap text in Excel for each of the methods discussed above:
- Wrap Text command in Home tab: Select the cell with wrapped text and click Home 🡪 Wrap Text.
- Wrap text using the Format Cells window: Once the Format Cells window appears (by following the steps explained earlier), uncheck the Wrap text box in the Alignment
- Wrap text using the shortcut: Select the cell with wrapped text and press Alt + H + W.
- Wrap text using line breaks: Select the cell with the wrapped text and press Ctrl + H. It will open the Find and Replace window Click on the Find What box and press Ctrl + J. We can see a blinking dot. Leave Replace With box empty and click on Replace All as shown below.
Then, click on Home 🡪 Wrap Text to unselect it.
Alternatively, we can remove wrap text in Excel manually. First, place the cursor at the line break and press the Backspace key to clear the line break. And then, choose Home 🡪 Wrap Text to unselect it.
Wrap Text Not Working
Sometimes, the option to wrap text in Excel may not work. Let us look at the possible reasons for that and the required solutions.
- The cell column width is more than the length of the text string
We will not see any change when we try to wrap the text in such a cell. However, we can resize the cell column width and click on the Wrap Text command on the Home page to enable it.
2. Row height is not appropriate
We may apply the command wrap text in Excel, but the entire cell content might not be visible. This happens when the row height does not have the required value. We can select the cell with the issue and choose Home 🡪 Format 🡪 AutoFit Row Height from the drop-down list as shown below.
We can also select the Row Height, found above the AutoFit Row Height option, and manually enter the required height value.
3. Wrap text in Excel feature might not work in merged cells
The wrap text format might not work in merged cells, especially when the columns are wide enough. So, we can select the merged cell and click on Home 🡪 Merge & Center. Then choose Unmerge Cells option from the drop-down list.
The cells will get unmerged, and we can then select Home 🡪 Wrap Text to wrap the cell content.
4. The Horizontal Alignment setting is not General
To avoid text string overflowing into the adjacent cells, we can set the Horizontal Alignment in the Format Cells window for the particular cell (when Fill is selected). Then, we can apply the command and wrap the text in an Excel cell at the location. As shown below, we may observe that the cell content remains truncated in cell D1.
Then, right-click on the specific cell and select the Format Cells tab. Set the Horizontal Text Alignment as General in the Alignment tab and click OK.
After enabling the Wrap Text function in excel, align the text using Home 🡪 Alignment.
We will get the result as shown below.
Important Things To Note
- When you use the Wrap text in Excel function in a cell, it is easier to view the entire content in that specific cell.
- Once you enable the Wrap Text feature in your spreadsheet, the data you paste from other sources get wrapped. The cells’ row and height adjust automatically, accommodating the text within the individual cells.
- A cell content wraps according to the cell column width. Thus, when you adjust the column width, the data wrapping gets modified automatically.
- To make a wrapped text visible all the time, choose Home 🡪 Format 🡪 AutoFit Row Height. Otherwise, you can manually increase the row height.
Frequently Asked Questions (FAQs)
We can find the Wrap Text command in the Alignment section of the Home tab. or the Format Cells window.
The wrap text option fits a lengthy text string or data within the cell, thus preventing the cell text from overflowing into the adjacent cells. As a result, the cell text becomes more presentable as we can see the entire text in multiple lines inside the cell.
1. Select the particular cell or cell range with the content we wish to wrap.
2. Click on Home 🡪 Wrap Text.
We can also select the required cell or cell range and use the keyboard shortcut, Alt + H + W, to enable the wrap text function in excel.
The different options for text wrapping are:
1. Choose the Wrap Text command in the Alignment section of the Home
2. Select the Wrap text option in the Alignment tab of the Format Cells
3. Use the keyboard shortcut, Alt + H + W.
4. Add line breaks in the text you want to wrap
This article must be helpful to understand the wrap text in Excel, with its formula and examples. You can download the template here to use it instantly.
This has been a guide to Wrap Text in Excel. Here we learn to wrap text in a spreadsheet using the shortcut, with examples and a downloadable template.. You can learn more from the following articles –