View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Felix Felix is offline
external usenet poster
 
Posts: 78
Default Eliminate Duplicates

I have a single column with numbers from which I want to eliminate duplicates.
The colums can be sorted, but one number for which duplicate(s) exist must
remain.

There are, however, no fixed amount of entries in the column.

I tried

Sub RemoveDupes()

'Add extra Column, "A" becomes "B"
Columns(1).EntireColumn.Insert

'Filter out duplicates and copy unique list to "A"
Range("B1", Range("B65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=Range("A1"), Unique:=True

'Add extra Column, "B" becomes "A"
Columns(2).EntireColumn.Delete


but nothing happens...


--
Felix