Extracting unique data from a range

J

Joe

I have a list of data over 20,000 lines long, with an
unknown number of duplicates. I either want to extract one
record for each unique record. or delete the duplicates.

I don't think there is a function that will do this.
Filter would be too slow and manual. I am thinking that an
If/Then statement with Do/Loop would work, but I am having
difficulties with the syntax. Also can't get away from
specific cell reference.

This is how I see it:
Sub DeleteDuplicates()
Range("B1").Select
If Selection = Range("B2") Then
Delete xlrow
Else: xlDown
do loop until selection = Null
End Sub

This is pretty rough and won't come near compile, but gets
the idea accross.

Suggestions?
 
Top