Forum Discussion

nickyshfs's avatar
nickyshfs
Copper Contributor
Dec 16, 2022

multiple lines of text within text output of formula

I would like it so that if someone keys "SO P" into cell B1, then the output is the following text within the selected cell (note, I'D LIKE MULTIPLE LINES OF TEXT WITHIN THE ONE CELL:

 

Full value =

Share value =

 

I have the following simple formula....

 

=IF(B1="SO P", "Full value =

Share value =","")

 

I tried using ALT and return within the logic, as I would if putting multiple lines within a single cell in the excel sheet, but the output still just comes out on a single line as "Full value = Share value =".

 

 

Is there a way to get them beneath each other within the one cell please?

 

Alternatively, I'd be happy if the single cell split if the IF condition was true and the "Full Value =" was within one cell and the "Share value =" was within another??  but I have no clue is this is possible??

 

many thanks!

 

 

5 Replies

  • nickyshfs 

    Use

    =IF(B1="SO P", "Full value =" & CHAR(10) & "Share value =","")

    Entering a line break in a formula only changes the way the formula is displayed. To enter a line break in the result, concatenate with CHAR(10), the line break character.

    • nickyshfs's avatar
      nickyshfs
      Copper Contributor
      thank you so much! But I've tried this and am still getting the same result...?
      • nickyshfs's avatar
        nickyshfs
        Copper Contributor
        I can't see how I can add an image into a reply so have put it in my main post....

Resources