Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
you could also try the "Dictionary" attack. It needs a reference to the windows scripting runtime to work: Sub RemoveDuplicates() Dim Rng As Range, Cell As Range Dim List As New Dictionary Dim i As Integer ' The items are in A1:A10 Set Rng = Application.Range("B2:B20") For Each Cell In Rng With Cell If List.Exists(.Value) Then List(.Value) = List(.Value) & "," & .Address(0, 0) Else List.Add .Value, .Address(0, 0) End If End With Next Cell ' Print out the list is the Immediate window For i = 0 To List.Count - 1 Debug.Print List.Items()(i), List.Keys()(i) Next i End Sub Dm Unseen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Collections of Collections | Excel Programming | |||
Help with collections | Excel Programming | |||
Using Collections | Excel Programming | |||
Collections Lookups | Excel Programming | |||
Comparing Collections | Excel Programming |