Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a text cell I2 and a text cell J2. I want cell K2 to be the contents of I2 concatenated with a newline and the contents of J2. How can I do this?

I2    J2    K2
big   dog   big
            dog

I've tried using Ctrl-Enter in various places and char(10) and char(13) to no avail. The newline always disappears.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

It looks like char(10) actually did the trick, but it's just not visible in the sheet. When the data from the spreadsheet is used in a mail merge later (for address labels), the newline is there!

share|improve this answer
2  
The behavior in general is fixed in OpenOffice 3.2: openoffice.org/dev_docs/features/3.2/#calc_newlines –  Jim Hunziker Mar 13 '10 at 20:17

On Linux you can use:

=CONCATENATE("line 1";char(10);"line2")
share|improve this answer
    
As Jim said below, you can do this in OpenOffice 3.2+ now. Worked for me on Windows OO 3.3. –  DanM Jan 12 '13 at 22:06

Type CTRL+Enter in an unused cell, then in the formula for K2 use I2&(address of the cell with the CTRL+Enter)&J2

I stumbled upon it by accident (playing a hunch) and it displays correctly and prints correctly...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.