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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Update: Try TEXT(CHAR(ASC(10)),""). For example: =B3&TEXT(CHAR(ASC(10)),"")&"-"&B4. Then wrap-text the cell.
 
Upvote 0
Or just =B3 & CHAR(10) & "-" & B4
 
Upvote 0
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

[SIZE=-1][ This Message was edited by: fearless613 on 2002-05-30 09:44 ][/SIZE]

This worked for me. Highlight the cells you want to convert first.

Sub Replace_Soft()

Dim c As Variant


For Each c In Selection
c.Value = Replace(c.Value, " | ", Chr(10))
Next c


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

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