Tuesday, February 12, 2013

[excel] How to force a newline in formula?

Case:
I want to bring together three columns of text into 1 column. For example:
A = CommentA
B = CommentB
C = CommentC

If you concatenate (=A&B&C) you get CommentACommentBCommentC. I know you can put in characters and spaces using "" inbetween the & (e.g =A&","&B&","&C), but is there a way to get excel to move the next comment onto a new line within the same cell so it looks like:
CommentA
CommentB
CommentC

Answer:
1. Try using the function CHAR to generate a newline character in your formula. It should look something like this ...
=A1&CHAR(10)&B1&CHAR(10)&C1

2. You will probably need to format the cell so that alignment has Text Wrap activated.