Skip to content

Instantly share code, notes, and snippets.

@ndthanh
Created May 24, 2017 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndthanh/d8d0f701d60157467da175f96b58893c to your computer and use it in GitHub Desktop.
Save ndthanh/d8d0f701d60157467da175f96b58893c to your computer and use it in GitHub Desktop.
'https://blog.hocexcel.online/huong-dan-cach-gop-nhieu-dong-thanh-mot-dong-trong-mot-o-tinh-excel.html
'https://hocexcel.online
Sub RemoveCarriageReturns()
Dim MyRange As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each MyRange In ActiveSheet.UsedRange
If 0 < InStr(MyRange, Chr(10)) Then
MyRange = Replace(MyRange, Chr(10), "")
End If
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment