David G
David G

Reputation: 2347

Referencing a cell to have a line change

In excel, it is possible to force a line change in the cell by pressing alt+enter when typing. Say I have cell A1 with "abc" on the top and "def" on the next line.

I want to write "=A1" in the cell A2 so that it displays the same thing. Unfortunately, they get concatenated, and in A2 it is simply written abcdef.

Does anyone know if it is even possible to do?

writing

="abc" & vbLF & "def"

does not work. Neither does chr(10). I can do it with vba but I would rather have a simple reference.

A copy/paste of A1 does not work either, as it splits the text between the cells underneath it. (A2 contains "abc", and A3 contains "def")

Upvotes: 1

Views: 62

Answers (1)

chancea
chancea

Reputation: 5968

If you select the cell with the formula and hit "Wrap Text" the line breaks will appear as they were in the referenced cell.

For those that don't know where wrap text is at it is under the "Home" Tab in the "Alignment" category: (for excel 2010)

enter image description here

Upvotes: 2

Related Questions