Calc: How to concat CTRL+ENTER to a string?

All,

To place two lines of text in a cell I type the first line then press CTRL+ENTER and type the second line. I am trying to do this in an equation and don't know how.

Here's what I have:

=CONCATENATE("Target Balance Assuming ", E2*100, "% Growth")

I want everything after "Target Balance" to appear in the second line of the cell so that the cell looks like this:

Target Balance
Assuming xx% Growth

How do I modify the above equation to achieve this?

Thanks,
-Bill

Hi William,

=CONCATENATE("Target Balance Assuming ", E2*100, "% Growth")

I want everything after "Target Balance" to appear in the second
line of the cell so that the cell looks like this:

Target Balance
Assuming xx% Growth

First, you do not need to use CONCATENATE. You can just use the
&-operator for concatenating strings. However, you can use the
CONCATENATE function, as well, if you want. :wink:

For a line break, take the ASCII character no. 10.

e.g.

="Target Balance Assuming" & CHAR(10) & E2*100 & "% Growth"

Cheers,
Stefan

Hi,try: =CONCATENATE("Target Balance" & CHAR(10) & "Assuming " & E2*100 & "% Growth")
  /Gary From: William Drago <wdrago@suffolk.lib.ny.us>

On a Windows platform I use &CHAR(13)&CHAR(10) [CR+LF] instead of just &CHAR(10) [LF] which I use on a Linux platform or just &CHAR(13) [CR] which I would expect to use on a MAC platform

Do I over complicate the process?

On a Windows platform I use &CHAR(13)&CHAR(10) [CR+LF] instead of just &CHAR(10) [LF] which I use on a Linux platform or just &CHAR(13) [CR] which I would expect to use on a MAC platform

Those are the conventions for plain text files on those systems. Although I believe Mac OSX uses LF, same as Unix, while Mac OS up to version 9 used CR.

Even in the case of plain text, now that files are so readily transferred between systems, most decent text editors cope fine with all 3 formats regardless of which system they're running on.

Do I over complicate the process?

For LibreOffice documents, I think you do. What do you do in a document which might be transferred between different systems?

Does CHAR(13) in a LibreOffice formula on Mac even have the intended effect of splitting lines? Come to that, does LibreOffice even run on Mac OS 9 or before? I suspect LibreOffice only uses CHAR(10) regardless of OS, although I don't have a Mac (let along one before OSX) to try.

On Windows LibreOffice, all that's needed is CHAR(10). CHAR(13) has no apparent effect, other than cluttering the formula.

Mark.

Thank you, Mark. I also don't have a MAC so on that score I was speaking theoretically.

Thanks to all who replied. <y problem is solved. This is what I'm using:

="Target Balance" & CHAR(10) & "Assuming " & $E$2*100 & "% Growth"

No need for the CHAR(13).

-Bill