Working with text in Excel can be a challenge, especially when you need to manipulate it in a specific way. One common task is to concatenate text from one cell with text from another cell, and sometimes you need to add a line break or a new line in the middle of the text. In this article, we'll explore five ways to concatenate text and add a new line in Excel.
Excel is a powerful tool for data analysis and manipulation, but its text-handling capabilities are often overlooked. When working with text, you might need to join two or more cells together, and sometimes you need to add a line break or a new line in the middle of the text. Adding a new line can make the text more readable, especially when working with large blocks of text. In this article, we'll explore five ways to concatenate text and add a new line in Excel.
Excel provides several ways to work with text, from basic concatenation to more advanced techniques using formulas and functions. Whether you're a beginner or an advanced user, there's a method to suit your needs. In this article, we'll cover the most common methods for concatenating text and adding a new line in Excel.

Method 1: Using the Ampersand (&) Operator
One of the simplest ways to concatenate text in Excel is by using the ampersand (&) operator. This method allows you to join two or more cells together and add a new line in between. To do this, follow these steps:
- Select the cell where you want to display the concatenated text.
- Type the equals sign (=) to start the formula.
- Type the text or the cell reference that you want to concatenate.
- Type the ampersand (&) operator.
- Type the CHAR(10) function to add a new line.
- Type the ampersand (&) operator again.
- Type the next cell reference or text that you want to concatenate.
- Press Enter to apply the formula.
The formula will look something like this: =A1&CHAR(10)&B1
This method is simple and effective, but it can become cumbersome if you need to concatenate multiple cells.
Example:
Suppose you have two cells, A1 and B1, containing the text "Hello" and "World", respectively. You want to concatenate these cells and add a new line in between. The formula would be: =A1&CHAR(10)&B1
The result will be: Hello World
Method 2: Using the CONCATENATE Function
Another way to concatenate text in Excel is by using the CONCATENATE function. This function allows you to join two or more cells together and add a new line in between. To do this, follow these steps:
- Select the cell where you want to display the concatenated text.
- Type the equals sign (=) to start the formula.
- Type the CONCATENATE function.
- Type the text or the cell reference that you want to concatenate.
- Type a comma (,) to separate the arguments.
- Type the CHAR(10) function to add a new line.
- Type a comma (,) to separate the arguments.
- Type the next cell reference or text that you want to concatenate.
- Close the parentheses.
- Press Enter to apply the formula.
The formula will look something like this: =CONCATENATE(A1,CHAR(10),B1)
This method is similar to the ampersand (&) operator, but it provides more flexibility when working with multiple cells.
Example:
Suppose you have two cells, A1 and B1, containing the text "Hello" and "World", respectively. You want to concatenate these cells and add a new line in between. The formula would be: =CONCATENATE(A1,CHAR(10),B1)
The result will be: Hello World

Method 3: Using the TEXTJOIN Function
If you're using Excel 2016 or later, you can use the TEXTJOIN function to concatenate text and add a new line. This function allows you to join two or more cells together and add a delimiter, such as a new line. To do this, follow these steps:
- Select the cell where you want to display the concatenated text.
- Type the equals sign (=) to start the formula.
- Type the TEXTJOIN function.
- Type the delimiter that you want to use, such as CHAR(10) for a new line.
- Type a comma (,) to separate the arguments.
- Type the text or the cell reference that you want to concatenate.
- Type a comma (,) to separate the arguments.
- Type the next cell reference or text that you want to concatenate.
- Close the parentheses.
- Press Enter to apply the formula.
The formula will look something like this: =TEXTJOIN(CHAR(10),TRUE,A1,B1)
This method is more flexible than the previous methods, as it allows you to join multiple cells together and add a delimiter.
Example:
Suppose you have two cells, A1 and B1, containing the text "Hello" and "World", respectively. You want to concatenate these cells and add a new line in between. The formula would be: =TEXTJOIN(CHAR(10),TRUE,A1,B1)
The result will be: Hello World
Method 4: Using the Alt+Enter Key Combination
If you need to add a new line within a cell, you can use the Alt+Enter key combination. This method allows you to add a new line without using a formula. To do this, follow these steps:
- Select the cell where you want to add a new line.
- Type the text that you want to display.
- Press Alt+Enter to add a new line.
- Type the next line of text.
- Press Enter to apply the changes.
This method is simple and effective, but it can become cumbersome if you need to add multiple lines.
Example:
Suppose you have a cell containing the text "Hello". You want to add a new line and type "World". Press Alt+Enter to add a new line, and then type "World". The result will be: Hello World
Method 5: Using VBA Macros
If you're comfortable with VBA macros, you can create a custom macro to concatenate text and add a new line. This method allows you to automate the process and apply it to multiple cells. To do this, follow these steps:
- Open the Visual Basic Editor by pressing Alt+F11.
- Create a new module by clicking Insert > Module.
- Paste the following code: Sub ConcatenateText() Range("A1").Value = Range("A1").Value & vbLf & Range("B1").Value End Sub
- Close the Visual Basic Editor.
- Select the cell where you want to display the concatenated text.
- Press Alt+F8 to open the Macro dialog box.
- Select the macro and click Run.
This method is more advanced, but it provides more flexibility and automation.
Example:
Suppose you have two cells, A1 and B1, containing the text "Hello" and "World", respectively. You want to concatenate these cells and add a new line in between. The macro will apply the changes automatically.

Concat Excel Image Gallery










In conclusion, concatenating text and adding a new line in Excel can be achieved in several ways. Whether you're using the ampersand (&) operator, the CONCATENATE function, the TEXTJOIN function, the Alt+Enter key combination, or VBA macros, there's a method to suit your needs. By mastering these techniques, you can improve your productivity and create more readable text in your Excel spreadsheets.