unique values only

  • Thread starter Thread starter pete
  • Start date Start date
P

pete

Normally I had to use the advanced filter to give me
unique values only. How can I write a formula to do it so
that I don't need a macro to run it?
e.g.
apples
oranges
oranges
apples
grapes

will give me a list of
apples
oranges
grapes


Thanks.
 
Hi Pete,

If your data range was A2:A6, and your result range was B2:B6 you would
enter the following formula into B2:

=INDEX($A$2:$A$6,MATCH(0,COUNTIF($B$1:$B1,$A$2:$A$6),0))

typed as an array formula (hold Ctrl+Shift when pressing Enter). Then
filled down to B6.

Steve D.
 
Back
Top