I am looking for VBA code that takes out the Carriage Return Character. I have a column that carriage return is unevenly coming in each row. How to take it out? VBA Code?
=SUBSTITUTE(A1,CHAR(13),"")
Will do the same for cell A1. Excel appears to remove the line break if you use either [code]CHAR(13) (carriage return) or CHAR(10)
(line feed).
If you want a space instead of a line break, you can use:
Thank you for the response. I have 3 carriage returns in one row, can I use SUBSTITUTE(A1,CHAR(13)," ") to remove all three in a row, while I have 50000 Rows?
If I want to use it in VBA, what would be the whole code?