Hi,
1 have data in sheet1 range a2 to a60
The following code paste unique vales to another sheet in one column.
is it possible to paste unique data from a2 to a20 in sheet2 column a then from a21 to a40 in sheet2 column b and from a41 to a60 in sheet2 column c
Thanks
1 have data in sheet1 range a2 to a60
The following code paste unique vales to another sheet in one column.
is it possible to paste unique data from a2 to a20 in sheet2 column a then from a21 to a40 in sheet2 column b and from a41 to a60 in sheet2 column c
VBA Code:
Sub Uniques()
Dim c As Range, ar As Variant, var As Variant
Dim Rng As Range: Set Rng = Sheet2.Range("b2", Sheet2.Range("b" & Sheet1.Rows.Count).End(xlUp))
With Rng
With CreateObject("Scripting.Dictionary")
For Each c In Rng
var = .Item(c.Value)
Next c
ar = .Keys
End With
End With
Sheet2.Range("A2").Resize(UBound(ar) + 1) = Application.Transpose(ar)
Thanks