Replacing 'new line' separator with just a space in VBA

killpaddy

Board Regular
Joined
Jul 31, 2012
Messages
52
I have an excel file like the one contained in the link below:

https://docs.google.com/spreadsheet/...kJEdEZDejRTbFE


I want some VBA code (perhaps using the 'Replace' function) that changes the text in column A to one line rather than having new lines

e.g. in cell A2
'Quick Turn 8; 10
8 Station; 8 Position'

Becomes:

'Quick Turn 8; 10; 8 Station; 8 Position'

I think it would be fairly simple except I don't know what the character for 'next line' is.

Thanks in advance for any help
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Code:
Columns(1).Replace Chr(10), "; "
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,977
Members
452,540
Latest member
haasro02

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