-
If you use a structure like this[VBA]On Error Resume Next
For each oneCell in Range("A1:A9000")
myCollection.Add item:=CStr(oneCell.Value), key:= CStr(oneCell.Value)
Next oneCell
On Error Goto 0[/VBA]
It will ignore the error a duplicate value causes, but doesn't add it to the collection, and carrys on with the next cell until it reaches the end of the range.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules