How do I insert a carriage return in a text formula?

fearless613

New Member
Joined
May 29, 2002
Messages
2
I know I can do it manually with alt+enter, but how can I insert a carriage return in a formula? Using char(10) or char(13) just gives me the little black box.

Thanks,

Jon
This message was edited by fearless613 on 2002-05-30 09:44
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try the following:

ActiveCell.FormulaR1C1 = "First Line" & Chr(10) & "Second Line" & Chr(10) & "Third Line"
 
Upvote 0
="Jack and Jill"&CHAR(10)&"went up the hill..."

Format the cell containing this formula with a "Wrap text" Alignment
This message was edited by Mark W. on 2002-05-30 09:55
 
Upvote 0
Your solutions work fine with text in quotes:
= "First Line" & Chr(10) & "Second Line" & Chr(10) & "Third Line"

But I'm working with cell references:
= B10&CHAR(10)&C10&CHAR(10)&D10
(which doesn't work...)

Any ideas?
 
Upvote 0
John,

you have a leading space after your "=" sign in your formula..... is this your problem ?

If not, I guess your cells you're referencing can also contain numbers as well as text, these two approaches do seem to work :

=TEXT(A1,"#,###.00")&CHAR(10)&TEXT(A2,"#,###.00")&CHAR(10)&TEXT(A3,"#,###.00")&CHAR(10)&TEXT(A4,"#,###.00")&CHAR(10)&TEXT(A5,"#,###.00")&CHAR(10)&TEXT(A6,"#,###.00")&CHAR(10)

=A1&CHAR(10)&A2&CHAR(10)&A3&CHAR(10)&A4&CHAR(10)&A5&CHAR(10)&A6&CHAR(10)
 
Upvote 0
<CENTER><TABLE ALIGN=CENTER BORDER=1 BORDERCOLOR=#C0C0C0 CELLSPACING=0><TR><TD COLSPAN=5 BGCOLOR=#0C266B ><TABLE ALIGN=CENTER BORDER=0 WIDTH=100%><TR><TD ALIGN=LEFT><FONT COLOR=WHITE>Microsoft Excel - Book3</FONT></TD><TD ALIGN=RIGHT><FONT COLOR=WHITE SIZE=2>___Running: xl2002 XP : OS = Windows (32-bit) NT 5.00</FONT></TD></TR></TABLE></TD></TR><TR><TD BGCOLOR=#D4D0C8 COLSPAN=5>(<U>F</U>)ile (<U>E</U>)dit (<U>V</U>)iew (<U>I</U>)nsert (<U>O</U>)ptions (<U>T</U>)ools (<U>D</U>)ata (<U>W</U>)indow (<U>H</U>)elp</TD></TR><TR><TD BGCOLOR=WHITE COLSPAN=5><TABLE BORDER=0><TR><TD COLSPAN=5% ALIGN=CENTER BGCOLOR=White>A1</TD><TD COLSPAN=10% ALIGN=RIGHT BGCOLOR=#D4D0C8 >=</TD><TD COLSPAN=85% ALIGN=LEFT BGCOLOR=White>Jack</TD></TR></TABLE></TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER>
</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>A</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>B</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>C</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>D</CENTER></TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>1</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>Jack</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><A HREF=javascript:alert('=A1&CHAR(10)&A2&CHAR(10)&A3&CHAR(10)&A4&CHAR(10)&A5&CHAR(10)&A6&CHAR(10)')><FONT FACE=Arial COLOR=#000000>Jack
B
in
D
the
UK
</FONT></A></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>2</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>B</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><A HREF=javascript:alert('=A1&CHAR(10)
&A2&CHAR(10)
&A3&CHAR(10)
&A4&CHAR(10)
&A5&CHAR(10)
&A6&CHAR(10)')><FONT FACE=Arial COLOR=#000000>Jack
B
in
D
the
UK
</FONT></A></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>Jacks Way (nice and simple)</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>3</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>in</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>4</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>D</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>5</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>the</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#000000 ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#FFFF00>Wrap Text don’t forget</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>6</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#000000>UK</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>7</CENTER></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD COLSPAN=5><U>Sheet1</U></TD></TR></TABLE>
<FONT COLOR=#339966>To see the formula in the cells just click on the cells hyperlink</FONT>

<FONT COLOR=#339966 SIZE=1>The above image was automatically generated by [HtmlMaker V1.27]</FONT>
<FONT COLOR=#339966 SIZE=1>If you want FREE SOFT, <A HREF=mailto:corosuke@chan.co.jp>click here</A> and Colo will email the file to you</FONT>
<FONT COLOR=#339966 SIZE=1>This code was graciously allowed to be modified: by <A HREF=mailto:ivanmoala@xtra.co.nz>Ivan F Moala</A> All credit to Colo</FONT>
</CENTER>
 
Upvote 0
Or Try ....

<CENTER><TABLE ALIGN=CENTER BORDER=1 BORDERCOLOR=#C0C0C0 CELLSPACING=0><TR><TD COLSPAN=6 BGCOLOR=#0C266B ><TABLE ALIGN=CENTER BORDER=0 WIDTH=100%><TR><TD ALIGN=LEFT><FONT COLOR=WHITE>Microsoft Excel - Book4</FONT></TD><TD ALIGN=RIGHT><FONT COLOR=WHITE SIZE=2>___Running: xl2002 XP : OS = Windows (32-bit) NT 5.00</FONT></TD></TR></TABLE></TD></TR><TR><TD BGCOLOR=#D4D0C8 COLSPAN=6>(<U>F</U>)ile (<U>E</U>)dit (<U>V</U>)iew (<U>I</U>)nsert (<U>O</U>)ptions (<U>T</U>)ools (<U>D</U>)ata (<U>W</U>)indow (<U>H</U>)elp</TD></TR><TR><TD BGCOLOR=WHITE COLSPAN=6><TABLE BORDER=0><TR><TD COLSPAN=5% ALIGN=CENTER BGCOLOR=White>A1</TD><TD COLSPAN=10% ALIGN=RIGHT BGCOLOR=#D4D0C8 >=</TD><TD COLSPAN=85% ALIGN=LEFT BGCOLOR=White>Jack</TD></TR></TABLE></TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER>
</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>A</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>B</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>C</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>D</CENTER></TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>E</CENTER></TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>1</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#0000FF>Jack</FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><A HREF=javascript:alert('=TEXT(A1,%22#,###.00%22)&CHAR(10)&TEXT(A2,%22#,###.00%22)&CHAR(10)&TEXT(A3,%22#,###.00%22)&CHAR(10)&TEXT(A4,%22#,###.00%22)&CHAR(10)&TEXT(A5,%22#,###.00%22)&CHAR(10)&TEXT(A6,%22#,###.00%22)&CHAR(10)')><FONT FACE=Arial COLOR=#000000>Jack
In
the
uk
Mr
Excel
</FONT></A></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>2</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#0000FF>In </FONT></TD><TD BGCOLOR=#FFFFFF ALIGN=Left VALIGN=BOTTOM ><A HREF=javascript:alert('=TEXT(A1,%22#,###.00%22)
&CHAR(10)
&TEXT(A2,%22#,###.00%22)
&CHAR(10)
&TEXT(A3,%22#,###.00%22)
&CHAR(10)
&TEXT(A4,%22#,###.00%22)&
CHAR(10)&
TEXT(A5,%22#,###.00%22)
&CHAR(10)
&TEXT(A6,%22#,###.00%22)
&CHAR(10)')><FONT FACE=Arial COLOR=#000000>Jack
In
the
uk
Mr
Excel
</FONT></A></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#000000 ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#FF0000>Jacks way</FONT></TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>3</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#0000FF>the</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>4</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#0000FF>uk</FONT></TD><TD BGCOLOR=#000000 ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#FFFF00>Easy readining your agree!</FONT></TD><TD BGCOLOR=#000000>
</TD><TD BGCOLOR=#000000>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>5</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#339966>Mr</FONT></TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD><TD BGCOLOR=#FFFFFF>
</TD></TR><TR><TD WIDTH=1% BGCOLOR=#D4D0C8 ALIGN=CENTER><CENTER>6</CENTER></TD><TD BGCOLOR=#FFFFFF ALIGN=Center VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#339966>Excel</FONT></TD><TD BGCOLOR=#000000 ALIGN=Left VALIGN=BOTTOM ><FONT FACE=Arial COLOR=#00FF00>Hope this helps a bit to read clearer!</FONT></TD><TD BGCOLOR=#000000>
</TD><TD BGCOLOR=#000000>
</TD><TD BGCOLOR=#000000>
</TD></TR><TR><TD COLSPAN=6><U>Sheet1</U></TD></TR></TABLE>
<FONT COLOR=#339966>To see the formula in the cells just click on the cells hyperlink</FONT>

<FONT COLOR=#339966 SIZE=1>The above image was automatically generated by [HtmlMaker V1.27]</FONT>
<FONT COLOR=#339966 SIZE=1>If you want FREE SOFT, <A HREF=mailto:corosuke@chan.co.jp>click here</A> and Colo will email the file to you</FONT>
<FONT COLOR=#339966 SIZE=1>This code was graciously allowed to be modified: by <A HREF=mailto:ivanmoala@xtra.co.nz>Ivan F Moala</A> All credit to Colo</FONT>
</CENTER>
 
Upvote 0
Hi Chris, hope you dont mind recyled your formulas, not edit one bit, so as your work, with my bent world, and a touch of Jack!

Bent means when servers are bent IE dont work, fallen over, no other meaning intended, before i get ripped apart, servers bent -crashed!
 
Upvote 0
A trick gangster cures towards anyone unhelpful.

Nar,, ive messed up the sigy, with my bad HTML :(

Il sort it, as always mate i care to much and try to help to much, so the sigy to big, OK in text HTML goes ^!^!#^$

But im rubbish at Excel so my HTML stinks.

Take care mate hope your fit and well soon, chat in a bit bed now very late in London 1 or 2am by now i guess.

My children wake at 6am,.... logoff, beer Cuban cigar and sleep, snore twice and up… new day in this house, love the boys watched England pay dreadful, I teach them Football I was good at, if a bit hard and aggressive, ho hum. Nothing else in my life even been any good at bar watching formula 1 that is

Take care.
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,228
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top