Useful
Active Member
- Joined
- Mar 16, 2011
- Messages
- 494
Hi mr excel!
Now i've question about macroses
i've list that starts from the range A3 to A9 (1,5,5,1,8,6,8)
and i want to get unique result from B3
i've created the macro that below but there is an error (I've the other macro code that extracts the unique numbers-but i want to find out what is wrong in this code?)
Thanks beforehand!
Now i've question about macroses
i've list that starts from the range A3 to A9 (1,5,5,1,8,6,8)
and i want to get unique result from B3
i've created the macro that below but there is an error (I've the other macro code that extracts the unique numbers-but i want to find out what is wrong in this code?)
Code:
Sub Unique()
Dim a As Long
Dim b As Long
lastrow = Range("A10000").End(xlUp).Row
For a = 3 To lastrow
Range("B:B").Select
If Selection.Find(Cells(a, 1).Value) <> Cells(a, 1).Value Then
Cells(b, 2).Value = Cells(a, 1).Value
b = b + 1
End If
Next a
End Sub
Thanks beforehand!