Greetings,
I have following code in the enclosed file.
Sub Macro1()
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:=">", Replacement:="", lookat:=xlPart
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:="BT", Replacement:="", lookat:=xlPart
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:="p", Replacement:="", lookat:=xlPart
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:="t", Replacement:="", lookat:=xlPart
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:=" ", Replacement:="", lookat:=xlPart
Sheets("Sheet1").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Replace What:=" ", Replacement:="", lookat:=xlPart
End Sub
Open enclosed file and run Macro1 in order to understand what Macro1 is doing...
I need a macro which will do same operation of Macro1 but
delete other values except "A" and "B" and "C"
or
replace other values except "A" and "B" and "C" to nothing.
So, my aim is to shorten a Macro1.
Best wishes.
Bookmarks