copy and paste
Hello all,
I am using the macro below to cut and paste all the same contract numbers
and test results to a new sheet. This works fine except that only
information from column A to column Y will copy and paste. I am missing 3
columns Z, AA, AB. Can anyone tell me what I am doing wrong?
Sub RemoveDuplicates()
Dim allcells As Range, Cell As Range
Dim nodupes As New Collection
On Error Resume Next
For Each Cell In Range("A27:A500")
nodupes.Add Cell.Value, CStr(Cell.Value)
Next Cell
On Error GoTo 0
For Each item In nodupes
UserForm1.ListBox1.AddItem item
Next item
UserForm1.Show
end sub
Thank you in advance for your help....
Eric
|