If you want to add a line break inside the formula, you have to add the break line character to a formula.
We are going to merge these three columns with some text and insert this into a single column. Next, we add a page break in order to make them more readable.
Copy the following example.
First Name | Last Name | Location |
John | Doe | New York |
Mark | Snow | Warsaw |
Jack | Shadow | Berlin |
Add a new line to a cell formula
- Create a new column and name it Formula.
- Inside D2, enter the following formula:
1 |
="First Name: "&A2& ", Last Name: "&B2&", Location: "&C2. |
- Autofill cells D3 and D4. All cells are written into a single line, even if you stretch the row.
- Select all cells in column D and Click Home >> Alignment >> Wrap Text.
- The last thing you have to do, it to add break line character CHAR(10) for Windows or CHAR(13) for Mac into your formula.
1 |
="First Name: "&A2& ", "&CHAR(10)&"Last Name: "&B2&", "&CHAR(10)&"Location: "&C2 |
- Now, the text is separated by the CHAR(10) character and entered into multiple lines.