New Line in Excel Cell (Table of Contents)
Introduction to New Line in Excel Cell
A new line in a cell is called a line break that is generally used to end the current line and start a new line in the same cell. Let us see a simple example of this as below:
- First, use the keyboard shortcut Alt + Enter.
- Using concatenation/ampersand operator (&) and CHAR (10) function.
- Using the “Find & Replace” function.
How to Insert a New Line in Excel Cell?
Let’s understand how to insert a New Line in Excel Cell with some examples.
Example #1 – Using the Keyboard Shortcut Alt + Enter
The simplest way to insert a new line in an Excel cell is by using the keyboard shortcut Alt + Enter. Let us say we wish to enter the text “Happy Birthday” in two lines in the same cell (“Happy in one line and “Birthday” in the other line). So the following process can be used to do so:
- Position the cursor at a point or location in the cell where the new line is to be inserted.
- Now while holding down the Alt key, press the Enter key, and type the remaining text.
While inserting a new line in a cell, “Wrap text” should be enabled so as to see the desired text in a new line. If the cell is not in the “Wrap Text” mode, then all the text would be seen in a single line even if a line break is applied. We have the “Wrap Text” option in the “Home” tab of the ribbon.
So we can see in the above screenshot that when the “Wrap Text” option is enabled (highlighted in red), and so we can see the desired text in a new line. If this were not enabled, then even after inserting the line break, we would not be able to see “Birthday” in a new line.
Example #2 – Using Concatenation/Ampersand Operator (&) and CHAR (10) Function
Now let’s say in the above example, we wish to achieve the same result using concatenation/ampersand operator (&) and CHAR (10) function. Then the following steps can be used to do so:
4.9 (11,436 ratings)
View Course
To insert a line break with the help of a formula that uses concatenation/ampersand operator (&) and CHAR (10) function, the syntax used for the formula is:
=”text” & CHAR (10) & “text” & CHAR (10) & “text”, and so on
where,
- text: These are some portion of texts that have to be concatenated in different lines in the same cell
- CHAR (10) in between these text portions uses an ASCII code to return a line feed in Windows. This would force the formula to insert a new line.
So let us now see how this works:
Once the Char Function is used, the output is shown below.
So we can see in the above screenshot that when “Wrap text” is activated, then using the ampersand operator and CHAR (10) function also, we can achieve the same result of inserting a line break as with the keyboard shortcut. This is because the formula works by combining all the text pieces using the ampersand or concatenation operator with CHAR function between each piece with character code 10. This character code in Windows is used for a line break in Excel.
Example #3 – Using the Concatenation Operator and CHAR Function
Now we will use the Concatenation operator and CHAR function when “Wrap Text” is enabled. Let us say we wish to have each line of an address in a new line of the same cell. So the following steps can be used to do so using concatenation/ampersand operator (&) and CHAR (10) function:
Once CHAR and ampersand function is used, the output is shown below.
So we can see in the above screenshot that each section of the address is in the new line of the same Excel cell. This has also been achieved using the concatenation operator and CHAR (10) function when “Wrap Text” was enabled.
Example #4 – Using the Find & Replace Function
Now let us say we have an address of some people as follows:
Now, if we wish to insert a new line where there is a comma in the address. This is which we wish to insert in a cell with each line of an address in each new line of the same cell. So this can be done using the FIND and REPLACE function. The following steps can be used to do so.
- Select all those cells in which we wish to replace the comma with a new line.
- Now click on the ‘Home’ tab and click on ‘Find & Select’ -> ‘Replace’ (or press Ctrl + H). This will open the ‘Find & Replace’ dialog box.
- Now in the dialog box that appears, enter ‘,’ in the ‘Find What’ field. Then place the cursor in the ‘Replace’ field and press ‘Ctrl + J’ so as to insert a new line. After pressing Ctrl +J, we will see a blinking dot in the Replace field. Then click on ‘Replace All’.
- This will make the following changes in the above addresses.
So we can see in the above screenshot that wherever there was a comma in the address, a new line is inserted in place of it. These changes will again be seen only if “Wrap Text” is enabled or activated. If not, then changes would not be seen.
Things to Remember About New Line in Excel Cell
- A new line is to be inserted in a cell when we wish to add spacing between lines or paragraphs.
- The keyboard shortcut technique can be used to make complicated formulas easy to read.
- While inserting a new line in a cell, “Wrap text” should be enabled or activated so as to see the desired text in a new line.
- While using the CHAR (10) function and concatenation operator method to insert a line break or new line, creating a named range (using the ‘Define Name’ option) can also be used instead of CHAR (10) function.
Recommended Articles
This is a guide to New Line in Excel Cell. Here we discuss how to Insert New Line in Excel Cell along with practical examples and a downloadable excel template. You can also go through our other suggested articles –