Concatenate in excel with new line

In excel I can introduce a new line inside a cell with a [alt enter]

Boo[alt enter]Far

results in:

Boo
Far

Now A1 contains Boo, A2 contains Far. How can I display these values in A3 separated with a new line?

A3=A1[alt enter]&B1

results in BooFar

A3=A1&[alt enter]B1

results in BooFar

How can I get

Boo
Far

By using cell references?

Gary's Student's user avatar

asked Feb 14, 2014 at 12:23

dr jerry's user avatar

In A3 enter:

=A1 & CHAR(10) & A2

and format A3 for wrap text

answered Feb 14, 2014 at 12:27

Gary's Student's user avatar

Gary’s StudentGary’s Student

95.3k9 gold badges58 silver badges98 bronze badges

2

If it helps anyone using Office on Mac, you should use CHAR(13) for line breaks.
For the above example, that would be

=CONCATENATE(A1, CHAR(13), A2)

And of course, format for wrap text.

The 10 and 13 represent Line Feed & Carriage Return characters.

answered Jun 15, 2020 at 16:00

Serendipity's user avatar

SerendipitySerendipity

1,0051 gold badge10 silver badges19 bronze badges

Ever faced a situation when you are combining text from multiple cells with line break as separator?

Looking for a new fix or hack for this? Keep reading!

In this article, we are going to elaborately discuss the following:

  • CONCATENATE Excel Function
  • Line Break in Excel
  • 3 ways to Excel Concatenate with Line Break
  • Conclusion

CONCATENATE Excel Function

What does it do?

Joins two or more text strings into one string. The item can be a text value, number, or cell reference.

Formula breakdown:

=CONCATENATE(text1, [text2], [text3], …)

What it means:

=CONCATENATE(the first text, the second text, and so on…)


CONCATENATE Excel function joins two or more text strings into one string.  The item can be a text value, number, or cell reference.

If you add a double quotation with a space in between ” ” then this will add a space between the texts selected on either side.

Line Break in Excel

Line Break in Excel is added to end the current line and start a new line within the same cell. A long text with a line break and without a line break is shown below.

concatenate excel

In general, when you are typing a text in Excel and you need to add a line break, you can simply press Alt + Enter and Excel will take you to the new line within the same cell.

But what if you want that line break when you are trying to combine texts from different cells using a formula.

This is exactly what we will cover in the next section!

3 ways to Excel Concatenate with Line Break

Want to add a line break in between each text string?

This is done by entering the CHAR( ) function in between each text string/argument.

CHAR function returns a character specified by a number from 1 to 255. For example, CHAR(10) returns a line break in windows, CHAR(34) returns a ” (double quote), CHAR(64) returns @, etc.

So, by simply adding CHAR(10) in between your formula you can enter a line break. You will need to select WRAP TEXT in order to see each text on a separate line.

Follow the step-by-step tutorial below to see how easy it is to add a line break in Concatenate Excel using employee data on the example below. Don’t forget to download the Excel workbook and follow along:

 DOWNLOAD EXCEL WORKBOOK

METHOD 1: Use Concatenate Excel Formula

STEP 1: We need to enter the CONCATENATE Excel function in a blank cell:

=CONCATENATE(

Concatenate Formula

STEP 2: The CONCATENATE arguments:

text1, [text2], [text3], …

Which text do you want to join together?

Let us select all the columns:

=CONCATENATE(A12, B12, C12, D12)

Concatenate Formula

Now let’s add the function CHAR(10) to add a line break between each text

=CONCATENATE(A12, CHAR(10), B12, CHAR(10), C12, CHAR(10), D12)

Concatenate Formula

Apply the same formula to the rest of the cells by dragging the lower right corner downwards.

3 Quick & Easy ways to Concatenate Excel With A Line Break | MyExcelOnline

STEP 3: Go to Home > Alignment > Wrap Text to show the text in multiple lines and you now have all of the results!

3 Quick & Easy ways to Concatenate Excel With A Line Break | MyExcelOnline

This is how you can add a new line in excel concatenate formula. Let’s look at the other two methods as well!

METHOD 2: Use & (Ampersand) Sign

Instead of joining text using the Concatenate function, you can use the Ampersand (&) sign. The & sign works as a concatenation operator and clues together text for different cells as well as the char function.

The formula to combine text with line break in the previous example with & sign will be:

=A9 & CHAR(10) & B9 & CHAR(10) & C9 & CHAR(10) & D9

concatenate using & sign

METHOD 3: Use TEXTJOIN formula

This function is available in Excel 2019 & Office 365 only.

Instead of selecting individuals cells and adding a CHAR function again and again in the formula, you can use the advanced versions of concatenate function – TEXTJOIN.

TEXTJOIN can be used to concatenate a range of cells using a delimiter.

Excel requires three arguments for TEXTJOIN function:

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], [text3],..)

  1. Delimiter – The character you need to insert in between each text.
  2. Ignore_empty – It should be TRUE if you want to ignore empty cells and FALSE if you want to include the empty cells.
    By default, the value will be TRUE.
  3. Text – Range of cells you want to combine.

So, TEXTJOIN function in our example will look like this:

=TEXTJOIN(CHAR(10), TRUE, A10:D10)

concatenate using textjoin

Conclusion

In this article, you have gone through the 3 quick ways to combine text from different cells with a line break. You can use either a concatenate function or a & sign or TEXTJOIN function.

Make sure to apply Wrap Text to the cell when you are using Excel Concatenate new line!

In Excel, when we normally combine text from different cells using CONCATENATE. But sometimes while doing this we need to add a line break between the text which we want to combine.

As you know there are serval methods to concatenate text but when it comes to adding a line break we need to use a specific formula for this.

Here’s the deal: To insert a line break between text we need to use the CHAR function.

And in today’s post, I’m going to show you exactly 3 different formulas which you can use to have a line break while combining values from different cells. And the best part is all these 3 formulas are simple to use.

In all these formulas there is one thing which is commonly we have used. That’s the CHAR function. This function returns a specific character according to the number you have specified in it.

And to enter a line break we need to mention 10 if you are using the Excel Windows version and 13 if you are using the Excel MAC version. You can learn more about CHAR from here, and now, let’s move on to our line break formulas.

1. Using an Ampersand with CHAR

This is actually a simple formula in which you need to refer to all the cells which you want to combine but by using CHAR(10) between those cell references. Look at this formula below:

=A2&CHAR(10)&B2&CHAR(10)&C2
concatenate with line break simple formula

Important Note: Once you enter this formula in a cell make sure to apply “Wrap Text” to that cell.

here’s how this formula works…

Actually, in this formula, we have combined a total of five values by using an ampersand (&). Three cell values and two CHAR function for line breaks. First, we have A2 and then a line break, after that B2 and again a line break and in the end, C2.

Related Tutorial: Remove Extra Spaces in Excel

2. Using CHAR with CONCATENATE Function

This formula is almost the same as we have used above but here instead of using an ampersand (&) we have simply used CONCATENATE function. Edit the cell and enter the below formula in it.

=CONCATENATE(A2,CHAR(10),B2,CHAR(10),C2)
concatenate with line break using concatenate function

Again in this formula, make sure to apply “Wrap Text” to the cell.

here’s how this formula works…

In this formula, we have combined 5 different things using CONCATENATE. Value from cell A2, line break using CHAR, Values from cell B2, line break, and in the end, value from cell C2.

3. Combination of CHAR and TEXTJOIN to Get a Line Break within Text

TEXTJOIN is the advanced version of CONCATENATE. In the function, you can use a delimiter to combine text from cells. And here is the formula to get a line break while concatenating text from different cells.

=TEXTJOIN(CHAR(10),TRUE,A2:C2)
concatenate with line break text join

here’s how this formula works…

In the formula, we used CHAR as a delimiter and then used TRUE to ignore empty cells. And in the end, selected the entire range A2:C2 which we need to combine. Now what happens is, as we have specified CHAR(10), it will add a line break after every cell value.

Conclusion

While using a line break in a formula the two things you need to take care of using the CHAR function for the line break and applying “Word Wrap” to the cell. From all the above formulas which we have learned here, I believe using TEXTJOIN is the simple and the best way.

I hope you found this formula tip useful, but you need to tell me one thing now.

Which formula do you think is the best to use? Share your views with me in the comment section, I’d love to hear from you, and make sure to share this tip which your friends as well.

This Excel concatenate new line formula example helps you:

  • Join 2 strings;
  • While inserting a line break (new line).
Excel concatenate new line example formula
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-concatenate-new-line/

=String1&CHAR(10)&String2

For these purposes, String1 and String2 are the strings you concatenate.

Excel Concatenate New Line Example Formula

The Excel concatenate new line example formula below:

  • Joins the strings stored in cells B6 and B7;
  • While inserting a line break (new line).
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-concatenate-new-line/

=B6&CHAR(10)&B7

The image at the top of this post shows the results I obtain with this Excel concatenate new line example formula. I use the Wrap Text button in the Home tab of the Ribbon to wrap the text.

Excel Concatenate New Line Explanation

The CHAR function returns a character specified by a code number. Code 10 (CHAR(10)) returns a line break.

Therefore, use the CHAR function and code 10 (CHAR(10)) to insert a line break (add a new line) when:

  • Concatenating text; and
  • Creating an Excel concatenate new line formula.

When creating an Excel concatenate new line formula, wrap the text (use the Wrap Text button in the Home tab of the Ribbon) to ensure Excel displays the multiple lines.

The ampersand text concatenation operator (&):

  • Concatenates strings; and
  • Returns a single string with the concatenated items.

The ampersand text concatenation operator (&) is not the only way to concatenate items. You can find more Excel concatenate formula examples in the More Excel Concatenate Formula Examples section.

More Excel Concatenate Formula Examples

This formula example is part of a more comprehensive series of Excel concatenate formula examples.

  • Excel Concatenate Strings: Click here to open.
  • Excel Concatenate Number and String: Click here to open.
  • Excel Concatenate Date: Click here to open.
  • Excel Concatenate with Space: Click here to open.
  • Excel Concatenate New Line: Click here to open.
  • Excel Concatenate Double Quote: Click here to open.
  • Excel Concatenate Multiple Cells with Comma: Click here to open.

More Excel Training Materials and Resources

You can find more Excel Tutorials (including other formula examples) in the organized Tutorials Archive: Click here to visit the Archives.

If you want to ease all your operations and processes, you may be interested in Someka’s ready-to-use Excel and Google Sheets templates. Someka’s template collections cover, among others:

  • Project Management;
  • Human Resources;
  • Sales and Marketing;
  • Inventory Management;
  • Calendars and Timesheets;
  • Budgets; and
  • Invoices.

Click here to learn more about Someka’s Excel and Google Sheets templates

In Excel, you might come across situations where you need to combine strings into a single cell, but you want to display them in separate lines.

For example, you might have different address components like House number, Street name, city, state, and country, and you might want to combine them into a single cell containing the full address, where the main address, state, and country are in separate lines.

If it were a word processing software, simply pressing the return key would result in a line break. However, in spreadsheet software like Excel, it’s not that simple.

In this tutorial we will show you three ways to combine strings in Excel with line breaks:

  • Using the Ampersand Operator (&)
  • Using the CONCATENATE Function
  • Using the TEXTJOIN Function

Before we show you how to combine text with line breaks, it is important to understand how line breaks are represented in Excel.

In regular programming languages, the ‘n’ character is used to represent line breaks. However, in Excel, we need to use a Unicode character, specified using the CHAR function.

The CHAR Function

The CHAR function in Excel returns the character that corresponds to an ASCII value. It is usually used to specify characters in Excel that are hard to enter into a formula. 

An ASCII value is an integer between 1 and 255, each one representing a specific character. For example, the ASCII code for the line break character is 10.

The CHAR function takes just one parameter, which is the ASCII code that you want to convert to a symbol. So to display a line break character in Excel, we use the formula =CHAR(10).

We will be using this function in all the formula methods of this tutorial to create a line break character.

Now let us look at the three ways to use this CHAR function and concatenate with line breaks in Excel.

To demonstrate all three methods, we will be using the following dataset:

Address data in separate cells

We will concatenate the Street address, City, and State for each row into a single cell of column D, separating them with line breaks.

Method 1 – Using the Ampersand (&) Operator

This method is useful if you have a small number of strings that you want to concatenate into a single cell.

The ampersand operator (&) lets you join items (or strings) without having to use a function. 

The operator simply takes the string to its right and joins it to the end of the string that is specified to its left. For example, the formula =“Micro”&“Soft” returns the string “Microsoft”.

In our example, we can use the ampersand operator as follows to get the result of row 2 in column D:

=A2&CHAR(10)&B2& CHAR(10)&C2

Then copy the formula down to the rest of the cells of column D. The result we will get is as follows:

Ampersand to combine cells with line break

Formatting Results with Wrap Text

Notice from the above result, that we were able to combine all the three cell values alright, but they still don’t seem to be separated with line breaks.

They all appear in the same line!

The line breaks are there alright, but we just don’t see them because we haven’t formatted the resulting cell to display them.

To display your line breaks, you need to format the resultant cells in the ‘Wrap text’ format.

So select your cells in column D, press CTRL+1 to open the Format Cells dialog box, and check the box next to Wrap text (under the Alignment tab). Then click OK.

Apply Wrap text to show in separate lines

You should now see your cells display the address components in separate lines:

Result where data is combined with line breaks

Method 2 – Using the CONCATENATE Function

The next method uses the CONCATENATE function to basically do the same thing.

The CONCATENATE function is one of the text functions of Excel, that essentially joins two or more text strings into a single string.

The syntax for this function is as follows:

CONCATENATE(text1, [text2], ...)

Where each parameter (text1, text2, etc.) are string values that you want to combine. You can combine any number of strings. 

The first parameter is required, while any parameters after that are optional. In the absence of any more parameters, the function simply returns the string passed to it.

In our example, we can use the CONCATENATE function as follows to get the result of row 2 in column D:

=CONCATENATE(A2,CHAR(10),B2, CHAR(10),C2)

Then copy the formula down to the rest of the cells of column D. The result we will get is as follows:

Combine cells using CONCATENATE formula

Note: You will need to format your results to Wrap text in order to get the address components to appear in separate lines.

Final Result where data is combined with line breaks

You can also use the CONCAT function instead of CONCATENATE. Both functions do more or less the same thing.

The only difference is that the CONCAT function lets you reference a range of cells instead of individual ones. 

However, in this case, we only need to reference the cells individually (since each string needs to be separated by a line break character).

So, it doesn’t really matter which of the two functions you use.

Method 3 – Using the TEXTJOIN Function to Concatenate (for Excel 2019 and Office 365 only)

This method is by far the easiest and quickest and is ideal if you have a lot of components that you want to concatenate

The TEXTJOIN function is a newly added Excel function, which is only available in newer versions like Office 365, Excel 2019, and higher.

This function combines strings from multiple ranges with a specified delimiter between each text value.

A delimiter is a character or set of characters that are used to separate strings. For example, a common delimiter to separate text is the space character. 

Other delimiters could be the comma, semi-colon, etc. In our case, our delimiter is the line break character, since we want to combine the address components and then separate them with line breaks.

The syntax for the TEXTJOIN function is as follows:

TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)

Here,

  • delimiter is the character or string you want to specify as a delimiter to separate the concatenated strings. This parameter can also be empty. The delimiter needs to be specified between double quotes.
  • The ignore_empty parameter is used to specify if we want empty values to be included in the combined string. A TRUE value indicates that we want empty values ignored, while a FALSE value indicates that we want empty values included in the result.
  • text1, text2, … are the strings or ranges of cells containing strings that we want to combine.

In our example, our delimiter is the line break character, or CHAR(10). So, we can use the TEXTJOIN function as follows to get the result of row 2 in column D:

=TEXTJOIN(CHAR(10),TRUE,A2:C2)

Then copy the formula down to the rest of the cells of column D. The result we will get is as follows:

TEXTJOIN formula to combine with line breaks

Note: You will need to format your results to Wrap text in order to get the address components to appear in separate lines.

Resulting dataset with combined cells

As you can see, using the TEXTJOIN function, we could reference all the strings in one range, instead of having to separately refer to individual cells like in the previous two methods.

Moreover, we had to define the delimiter just once in the formula instead of repeating it after every string.

In this tutorial, we showed you three different ways to concatenate with line breaks in Excel.

The first two methods are more or less the same, with the exception that the first one uses an operator while the second one uses a function. 

The third method, on the other hand, is much quicker and simpler.

However, the function used in this method (the TEXTJOIN function) is only available in newer Excel versions like Office 365, Excel 2019, and higher.

I hope this short tutorial was helpful.

Other Excel tutorials you may also find helpful:

  • How to Remove Dotted Lines in Excel
  • How to Extract Text After Space Character in Excel?
  • How to Add Text to the Beginning or End of all Cells in Excel
  • How to Separate Address in Excel?
  • How to Remove a Specific Character from a String in Excel
  • How to Break Links To External References in Excel?
  • Opposite of Concatenate in Excel (Reverse Concatenate)

Понравилась статья? Поделить с друзьями:
  • Concat excel по русски
  • Concat cells in excel
  • Comобъект excel на сервере
  • Comобъект excel application не создается
  • Comобъект excel application если нет excel