Routine #11 from our series of text subroutines to use in EXCEL to remove all carrieage returns from a string (alt+enter). When applied to a range it will remove all carriage returns, ie. line brake character.
Code snippet below:
Sub remove_carriage_return() 'alt+enter character replace with one space Dim selected_range As Range Set selected_range = Range(Selection.Address) Dim old_value As String For Each cell In selected_range old_value = vbNullString: old_value = cell.Value cell.Value = Replace(old_value, vbLf, " ") Next End Sub
You can see how to add this to Excel in order to use the code in this thread UPPER CASE