I have this simple formula:

=CONCATENATE("foo";"bar")

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:

=CONCATENATE("foo";
             "bar")

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.

thanks

link|improve this question

50% accept rate
feedback

1 Answer

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

=CONCATENATE("foo";CHAR(10);"bar")

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.

link|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
feedback

Your Answer

 
or
required, but never shown

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