View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lonnie M. Lonnie M. is offline
external usenet poster
 
Posts: 184
Default Replace characters in columns in excel

Give something like this a try:

Sub remove10()
Dim Rng, r As Range
'removes carriage returns from A1 down
Set Rng = Range(Cells(1, 1), _
Cells(ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row, 1))
For Each r In Rng
r.Value = Application.Substitute(Trim(CStr(r.Value)), Chr(10), "")
Next r
End Sub

HTH--Lonnie M.