Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my OpenOffice spreadsheet, there are cells containing "\n" text.

Each "\n" occurrence needs to be replaced with a new line or line break.

The Find-and-Replace dialog does offer regular expressions when searching. So I can find them using \n but when the replacement is set to \n it replaces the occurrence with the text "\n" instead of a new line.

How can one Find-and-Replace a text into a new line?

share|improve this question
you want every cell after each cell with /n to drop down a row? Or do you want line breaks within the cells? – Raystafarian Feb 20 '12 at 18:19
The cells themselves must not shift down. I want line breaks within the cells. Those cells contain text that needs those line breaks – byneri Feb 20 '12 at 18:23

Use find and replace to find /n and replace with alt+0013 and alt+0010

Remember if you have a space after your /n that you include that space in the find-and-replace otherwise the new lines will start with a space

share|improve this answer
Doesn't work. Typing alt+0013 get's interpreted as pressing Enter in the search and replace dialog, so it just jumps the cursor to the first instance. – Moss Jul 25 '13 at 5:22
Where are you having this issue? Are you using the right number pad? Are you on Windows? etc – Raystafarian Jul 25 '13 at 8:41
Yes to both. Windows 7. – Moss Jul 30 '13 at 20:24
Oh, I'm using LibreOffice, sorry. Maybe that is the difference. – Moss Jul 30 '13 at 20:25
That doesn't work either. It just replaces with "nothing". – Moss Jul 30 '13 at 21:05

To search a character string XXX followed by a new-line, and replace it with the character string YYY followed by a new-line:

  • type the character string XXX immediately followed by the 2 characters alt+0013 and alt+0010 in the search box,

  • and type the character string YYY immediately followed by the 2 characters alt+0013 and alt+0010 in the replace box

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .