View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JS[_4_] JS[_4_] is offline
external usenet poster
 
Posts: 14
Default Clear a Carriage Return from a String Value

Hi,

The CLEAN worksheet function removes all non printable characters, try
something like this

Sub CarriageRtn()
Dim cell As Range
For Each cell In Selection
cell.Value = Application.WorksheetFunction.Clean(cell.Value)
Next cell

End Sub

Select the problem cells and run the macro