Extracting Unique Values From a List...using formula

scotawful

Board Regular
Joined
Mar 6, 2003
Messages
148
first, thanks in advance for any help. I searched through as many threads to see if this was already answered, but no luck.

I've got a list of values that changes regularly based on various user inputs (the range that the values appear in, however, is fixed). I need a formula that will then pull out unique values one by one. There may be a varying number of unique values depending on user inputs.

A quick example:
Column A has (one value in each row):
1
1
2
4
4
1
2

What I would like to show up in column B is (again, one value in each row):
1
2
4

The result doesn't necessarily have to appear ranked or ordered as I have it, just a listing of the unique values from the other list. I know this is relatively easy using VBA, but I need to do it with a formula as it will need to work on a variety of other machines and everybody here freaks out when anything having to do with macro security settings is involved.

Any ideas?

This is probably embarassingly simple. That will just mean that my brain is embarassingly slow today.
 
Assuming your data in column A occupies cells A1:A50

and

Every cell in A1:A50 is occupied (none empty)

and

You place this formula in cell B2 (note, that's B2, not B1)
=INDEX($A$1:$A$50,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$50),0))

and

You place that formula in cell B2 by pressing Ctrl+Shift+Enter (not just with Enter)

then

copy down the formula using the fill handle until it errors

which will list unique items in A1:A50, done by formula as you asked.
 
Upvote 0
Oh man, that's good stuff. Thanks for the quick reply. I figured it could be done with an array formula. This works perfectly!
 
Upvote 0
OK but why the awful in scotawful...are things all that bad in Southern California? So what if there's this rivalry between San Francisco and Los Angeles, but only the people here in San Francisco know or care about it.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,924
Members
453,767
Latest member
922aloose

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top