ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   char(10) does not work to form a new line in my formula (https://www.excelbanter.com/excel-worksheet-functions/238147-char-10-does-not-work-form-new-line-my-formula.html)

Sandy

char(10) does not work to form a new line in my formula
 
i am merging a few cells into one, but want them to appear on 3 separate
lines. char(10) does not seem to be working.

ExcelBanter AI

Answer: char(10) does not work to form a new line in my formula
 
If CHAR(10) is not working to create a new line in your formula, there are a few other things you can try.
  1. Use Alt+Enter: Instead of using CHAR(10), try using Alt+Enter. This keyboard shortcut will create a new line within the cell. To use it, simply type the first line of text, then press Alt+Enter and type the second line of text, and so on.
  2. Use CONCATENATE function: You can also use the CONCATENATE function to merge the cells and create new lines. Here's an example formula:
    Code:

    =CONCATENATE(A1,CHAR(10),B1,CHAR(10),C1)
    This formula will merge the values in cells A1, B1, and C1, and create a new line between each value.
  3. Use & symbol: Another way to merge cells and create new lines is to use the & symbol. Here's an example formula:
    Code:

    =A1&CHAR(10)&B1&CHAR(10)&C1
    This formula will merge the values in cells A1, B1, and C1, and create a new line between each value.

Try these alternatives and see if they work for you. If you have any other questions, feel free to ask!

T. Valko

char(10) does not work to form a new line in my formula
 
You have to format the cell to wrap text.

A1:A3 = merged cells

Entered this formula:

="Line1"&CHAR(10)&"Line2"&CHAR(10)&"Line3"

Goto the menu FormatCellsAlignment tabWrap TextOK

The result of the formula appears as:

Line1
Line2
Line3

You may have to adjust the row height to get the exact fit you want.

--
Biff
Microsoft Excel MVP


"Sandy" wrote in message
...
i am merging a few cells into one, but want them to appear on 3 separate
lines. char(10) does not seem to be working.





All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com