Hi!
For 2010 there is this piece of removing duplicates
ws.Range("A2:A" & lr2).RemoveDuplicates Columns:=1, Header:=xlNo
Now I need it for 2003 but it does not seem to work for me.
[pre]
[/pre]
I have an example file here https://www.dropbox.com/s/dlpniwa3h096zun/sampleremdub.xls
Can someone help me out with this?
For 2010 there is this piece of removing duplicates
ws.Range("A2:A" & lr2).RemoveDuplicates Columns:=1, Header:=xlNo
Now I need it for 2003 but it does not seem to work for me.
[pre]
Code:
Dim r As Range,n As Long, a()
Redim a(1 To lr2 - 1, 1 To 1)
With Createobject("Scripting.Dictionary")
.CompareMode = 1
For Each r In ws.Range("A2:A" & lr2)
If Not .Exists(r.Value) Then
n = n + 1
a(n, 1) = r.Value
.Item(r.Value) = Empty
End If
Next
End With
ws.Range("A2:A" & lr2).Value = a
I have an example file here https://www.dropbox.com/s/dlpniwa3h096zun/sampleremdub.xls
Can someone help me out with this?