Cyberdude
05-13-2007, 09:39 AM
I created a text box on a chart. I want to force a line feed in the text in 3 places so that it looks something like this:
Elapsed time since Feb 13, 06:
…....454 days
…...14.9 months
….....1.2 years
My formula that creates this text is:
=”Elapsed time since Feb 13, 06: "&CHAR(13)&
TEXT(TODAY() - DATEVALUE("2/13/2006"),"0"" days""")&CHAR(13)&
TEXT((TODAY() - DATEVALUE("2/13/2006"))/(365 / 12),"0.0 ""months""")&CHAR(13)&
TEXT((TODAY() - DATEVALUE("2/13/2006")) / 365, "0.0 ""years""") My problem is that the CHAR(13) function is being treated as a text character rather than a line feed, so that everything is displayed as though I had written a single line instead of 4 lines. How does a gent such as myself introduce a line feed into the text line in a text box?
I have a secondary problem. Assumming that I figure out how to do the line feed, how do I put a series of leading blanks on each "line fed" line so that the text becomes more centered? The text box mechanism tends to throw away all leading blanks on each line.
Edited 14-May-07 by geekgirlau. Reason: insert line breaks
Elapsed time since Feb 13, 06:
…....454 days
…...14.9 months
….....1.2 years
My formula that creates this text is:
=”Elapsed time since Feb 13, 06: "&CHAR(13)&
TEXT(TODAY() - DATEVALUE("2/13/2006"),"0"" days""")&CHAR(13)&
TEXT((TODAY() - DATEVALUE("2/13/2006"))/(365 / 12),"0.0 ""months""")&CHAR(13)&
TEXT((TODAY() - DATEVALUE("2/13/2006")) / 365, "0.0 ""years""") My problem is that the CHAR(13) function is being treated as a text character rather than a line feed, so that everything is displayed as though I had written a single line instead of 4 lines. How does a gent such as myself introduce a line feed into the text line in a text box?
I have a secondary problem. Assumming that I figure out how to do the line feed, how do I put a series of leading blanks on each "line fed" line so that the text becomes more centered? The text box mechanism tends to throw away all leading blanks on each line.
Edited 14-May-07 by geekgirlau. Reason: insert line breaks