Hi guys,
I managed to dig up and put together the following macro to clean up some data so I can see only original and no duplicates but the delete duplicates based on column B portion of the macro seems like it's being cut and skips some data.
here's a link for the excel files called "avails" and results after called "after"
https://drive.google.com/open?id=1KQ...be6fNAJsqL7FbE
The basic gist of the macro is to remove all rows that have "National Toronto" and "House Radio" in column A and also remove any rows that have duplicates in column B so I'm left only with original Advertisers.
For what ever reason the remove duplicates portion only works partially as after running the macro the following is missing from the results:
Korissa Siscou-Cruise Holidays of Clarkson
Lynn gunn-Gallery 121
Sophia Novanksy-vistaprint
Steve Mark-Capitol Theatre...
Susan Holden-The Gravenhurst Opera House
and here is my macro:
I can't figure out why it's doing this, can someone help me write or correct the code so it will work properly?Sub MissingRemoveDupes()
'
' MissingRemoveDupes Macro
'
Selection.AutoFilter
ActiveSheet.Range("$A$1:$O$940").RemoveDuplicates Columns:=2, Header:=xlYes
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("M:M").Select
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Columns("L:L").EntireColumn.AutoFit
Columns("K:K").Select
Selection.Delete Shift:=xlToLeft
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp))
Do
Set c = SrchRng.Find("House Radio", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp))
Do
Set c = SrchRng.Find("National Toronto", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
Thanks in advance!
Bookmarks