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

I have this simple formula:


which renders foobar on the cell.

How can I lay this formula in multiple lines in the same cell? I'd like to be able to do something like the following but it doesn't work as the newline in the cell forbids the formula from being executed:


The reason I'm asking is because I have huge formulas an I need to format them (using newlines and a bit of indentation) for readability.


share|improve this question

To insert a line break in the formula's result, this should work:


A structured overview over the current formula is provided by the function wizard (Ctrl+F2); it should directly display the Structure tab if the current cell already holds a formula.

share|improve this answer
Thanks but I don't want to output a newline as a result of the expression. I want to split my long expression with newline(s) for enhancing readability. – cherouvim Jun 28 '11 at 8:17
@cherouvim: oh, sorry, i see. Then, there's only the function wizard i can offer. I've amended my previous answer accordingly. – tohuwawohu Jun 28 '11 at 10:36

I tried to do this with LibreOffice Calc, v3.5.4.2 (!), and while I was able to enter (via CTRL-ENTER) multiple carriage-returns while editing the formula, once I pressed enter, it collapsed them into spaces.

You COULD edit your formulae in another editor, using the line breaks as desired, then copy & paste this into a cell. But that's still not optimal.

alas, there seems no hope. At least not today.

share|improve this answer

You must log in to answer this question.

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