Javatpoint Logo
Javatpoint Logo

Line Break in Excel

In other Microsoft applications pressing the enter key simply takes you to the next line. With Microsoft Excel, if you press enter, it will take you to the next cell. But What to do if we want to end the line and move the cursor to the new line in the same cell? Unfortunately, in such cases, the enter key won't work.

Don't worry; to implement this, Microsoft has introduced Line Break. In this tutorial, we will learn the various methods to add a line break in your Excel worksheets.

What is Line Break?

"Line break in Excel is defined as a technique to add the following line within the same cell. It ends the current line and moves the cursor to the new line in the same cell value".

Pressing the "Enter" key in Excel takes the user to the next cell. Therefore, the shortcut to insert a new line or a line break is by pressing the "ALT + Enter" keys together. Once the line break is inserted in your cell, you will notice that the cell's height also increases as it signifies the cell values.

Though, apart from this keyboard shortcut there are other methods as well that quickly helps you to insert a new line or line break in Excel. They are as follows:

  1. Line Break using Excel Concatenate function
  2. Line Break using AND function
  3. Using keyboard shortcut of Alt + Enter Method.

Method 1: Insert line break using keyboard shortcut

The simple and commonly used method quickly adds a line break to your Excel worksheet. If you only want to insert a couple of line breaks, you can manually use the keyboard shortcut "Alt + Enter" method. Just follow the given 3 steps, and you are done!

  • Select the cell where you want to insert the line break. Double-click on it and it will get you into the cell edit mode.
  • Position the mouse cursor to the place from where you want your line to end.
  • Next, we will Press the keyboard shortcut - ALT + ENTER. Simply hold the ALT key and finally the press Enter key.

As a result, you will notice, Excel has inserted a new line right where you had placed the cursor. Now you can continue to write in the cell and whatever you type will be placed in the next line.

NOTE: Sometimes, if the cell space is less, you might be able to see the content in the following line. Ensure that the selected cell is in the 'Wrap text' mode to see the text appear in the new line. In case it is not enabled, you will see all the content in a single line of the selected cell (even if you have inserted the line break). You can apply the warp text option from the Home Tab.

Method 2 - Insert a Line Break Using Excel AND Function

Let's suppose we are given have the name, phone number, and address of different employees in a column. But to conclude the data we want them in one single cell but with a line separator.

Line Break in Excel

Since we want all the three columns combined in a single line separated by a line break, therefore this time, we will cover this example using the AND function. But before we move ahead, let's understand what does a CHAR function mean?

Char is a unique Excel function that returns our computer system's specific code character. For instance, Char(10) returns a line break in the selected cell.

Following are the steps to an insert a line break in your cell using the AND function:

  1. The first step is to insert a help column in column and select all the blank cell where you want to put your data.
    Line Break in Excel
  2. Go to the Home tab- > Alignment section and click on the Excel Wrap text feature. It the Wrap Text feature is not enabled, all the content will appear in a single line.
    Line Break in Excel
  3. Next, we will write the AND formula in D2 column. To implement this, we will add data of all three columns, followed by '&' operator and Char(10).
    Your formula will be as follows: =A2&CHAR(10)&B2&CHAR(10)&C2&CHAR(10)
    Line Break in Excel
  4. Once done press the enter button. You will have the following output.
    Line Break in Excel
  5. Sometimes, you may not be able to see the whole content, don't panic, in such cases all you need to do is to expand the row by hovering your mouse cursor between two cells, A2 and A3 and clicking on the expand two button.
  6. Drag the formula down the cells to repeat it in the column. Select the formula cell, and take your cursor to the bottom right corner. You will notice your cursor will change into a + icon. Drag and pull the icon down the cells; the formula will be copied automatically, changing the relative cell references.
    Line Break in Excel

As a result, we have successfully inserted all the content followed by a line break in all the cells using the AND formula.

Method 3: Insert a Line Break using Concatenate Function

So far we have covered the keyboard short and AND formula to add a line break in Excel worksheet. Next, we will cover the cells to insert a new line within the same cell using the CONCATENATE function. But before moving ahead, let's understand what is a CONCATENATE function?

"The CONCATENATE is a built-in Excel function that joins various strings or numbers, or values into a single string."

Though we have already covered the functionality of the CHAR function in the above example, but for our revision, let's cover that once again.

The CHAR function returns our computer system's specific code character. For instance, Char(10) returns a line break in the selected cell.

In the below example, we are given the address of different employees segregated into different cells. Unlike the house number is stored in Column B, the street name is stored in Column C, and the locality and city are kept in columns D and E, respectively.

Line Break in Excel

Now, we are asked to combine the address in the Column, separating each data with a line break. To implement this, we can combine the CONCATENATE formula and the CHAR function in the selected cell.

Following are the steps to an insert a line break in your cell using the CONCATENATE function:

  1. The first step is to insert a help column in column and select all the blank cell where you want to put your data.
    Line Break in Excel
  2. Go to the Home tab- > Alignment section and click on the Excel Wrap text feature. Always make sure to enable the Wrap text feature. If the Wrap Text feature is not enabled, all the content will appear in a single line.
    Line Break in Excel
  3. Next, we will write the CONCATENATE function in E2 column. To implement this, we will add data of all three columns, followed by '&' operator and Char(10).
    Your formula will be as follows: =B2&CHAR(10)&C2&CHAR(10)&D2&CHAR(10)&E2
    Line Break in Excel
  4. Once done press the enter button. You will have the following output.
    Line Break in Excel
  5. Sometimes, you may not be able to see the whole content, don't panic, in such cases all you need to do is to expand the row by hovering your mouse cursor between two cells, A2 and A3 and clicking on the expand two button. You will have the correct output.
    Line Break in Excel
  6. Drag the formula down the cells to repeat it in the column. Select the formula cell, and take your cursor to the bottom right corner. You will notice your cursor will change into a + icon. Drag and pull the icon down the cells; the formula will be copied automatically, changing the relative cell references.
    Line Break in Excel

Things to Remember

Since we have covered the brief and detailed methods to insert line breaks in your Excel worksheet. But before ending this tutorial, let's quickly cover some important points that one should keep in mind before having flawless line breaks:

  1. If you are using the AND and CONCATENATE functions to insert a line break in Excel, always make sure to enable the wrap text option to see the whole data in the proper format else all the content will appear in a single line.
  2. After wrapping the text don't forget to expand the rows.
  3. The CHAR (10) function inserts a line break.
  4. The "Alt + Enter" method will only work for a single cell. However, if you want to apply the same to the next cell, you must again repat the same steps.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA