[Solved] Excel Macro to Locate Duplicate Values of a Column and Copy Adjacent Cells [closed]


Sub main()
Dim hold As New Collection
For Each celli In Columns(5).Cells
On Error GoTo raa
If Not celli.Value = Empty Then
hold.Add Item:=celli.Row, key:="" & celli.Value
End If
Next celli
On Error Resume Next
raa:
Range("a1:b1").Offset(celli.Row - 1, 0).Value = Range("a1:b1").Offset(hold(celli.Value) - 1, 0).Value
Resume Next
End Sub

1

solved Excel Macro to Locate Duplicate Values of a Column and Copy Adjacent Cells [closed]