unique values only

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.
 
S

Stephen Dunn

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top