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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,945
Messages
6,127,861
Members
449,411
Latest member
adunn_23

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