Picking unique Items

M

Michael

Can someone help advise the macro or code to pull out unique items from an
array.

Don't want to sort and manually pick them out.

Eg.

Apple
Banana
Apple
Orange
Orange
Banana

Result required : Apple, Orange and Banana
 
A

Ardus Petus

Data>advanced Filter
Leave criteria blank
Check "Unique"

Please forgive approximate translation from french Excel

HTH
 
M

Michael

Merci Petus,

Your advise will work but I was actually looking more for VB codes as i
have a number of other task to carry out after obtaining the unique Items.

Any idea?
 
A

Ardus Petus

Assuming your original data is in A1:A10
and you want unique values in column C:

Sub Unique()
Range("A1:A10").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("C1"), _
Unique:=True
End Sub

HTH
 
M

Michael

Thank You

Ardus Petus said:
Assuming your original data is in A1:A10
and you want unique values in column C:

Sub Unique()
Range("A1:A10").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("C1"), _
Unique:=True
End Sub

HTH
 
Top