J jat Dec 11, 2009 #1 is it possible to have a macro that removes duplicates except blanks in a column? jat
P Per Jessen Dec 11, 2009 #2 It is not a problem, but we need more information. Which column do you want to compare, should both entries be deleted? Regards, Per
It is not a problem, but we need more information. Which column do you want to compare, should both entries be deleted? Regards, Per
J Jacob Skaria Dec 11, 2009 #3 With data in ColA try the below macro which will use ColB as a helper column... Sub Macro1() Columns(1).Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, Orientation:=xlTopToBottom Columns(1).AdvancedFilter Action:=xlFilterCopy, _ CopyToRange:=Range("B1"), Unique:=True Columns(1).Value = Columns(2).Value Columns(2).Value = "" End Sub
With data in ColA try the below macro which will use ColB as a helper column... Sub Macro1() Columns(1).Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, Orientation:=xlTopToBottom Columns(1).AdvancedFilter Action:=xlFilterCopy, _ CopyToRange:=Range("B1"), Unique:=True Columns(1).Value = Columns(2).Value Columns(2).Value = "" End Sub