Hello All,
Long time lurk and reader first time poster.
I have a macro I have been using for a long time in numerous workbooks that cleans text in cells after the information updates from a CRM system I use. The CRM system uses Microsoft SharePoint and applies identifies after names (,#3459 for example). Anyhow, I wrote this macro and it has always worked but now it decided otherwise. I have checked all security settings and options and everything seems fine and I turn to you.
Please see below for my macro. I have checked the ranges in the macro and they are correct (Columns C:I). Any help is appreciated.
Sub NameClean()
'
' NameClean Macro
'
Application.ScreenUpdating = False
ActiveWorkbook.RefreshAll
Dim c As Range
Columns("C:I").Select
Set c = Selection.Find(What:=";#*;#", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False)
If Not c Is Nothing Then
Do
c.Replace What:=";#*;#", Replacement:="; ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
c.Replace What:=";#*", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Set c = Selection.FindNext(c)
Loop While Not c Is Nothing
End If
'ActiveWorkbook.Save
Application.ScreenUpdating = True
Range("A1").Activate
End Sub
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Thank you
Bookmarks