Discussion Locked

Excel String Wrapping

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Currenly I'm taking several string entries from different cells in Excel and joing them into one cell. Question is how do you get the new string to go onto a new line in different positions in the new cell.

5 replies

by dklippert

If you are using a formula to concatenate the strings, you can use CHAR(10) for a new line.
=A1&CHAR(10)&B1
The cell must be formatted as Wrap text so you won't see a little square (□).
If your using VBA, you can use VBLF or CHR(10).

by stuart.douglas

This is a good answer and works well, except when the cell you are joining together contains something like ?20 Baker Street? then it separates out the 20, Baker and Street and puts them on new lines.

by dklippert

=A1&CHAR(10)&B1 does work. CHAR(10) is the code for a new line.

When you say '20 Baker Street'. Do you mean that string in one cell or three seperate cells?
If the lines do not appear as you want, increase the width of the column.

This discussion is closed to new replies.