Formula to return unique values in a range in alphabetical order?

mrmiyagi

Board Regular
Joined
Dec 15, 2009
Messages
127
Hello,

I have a column A in a sheet called 'Project Management'.

What I want to do is use a formula to return a list of distinct project names from column a in alphabetical order.

Is this possible?

Thank you.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I cant think of a way to do it with a formula,

would you be happy with VBA if I talked you through it?
 
Upvote 0
If your data is in A2:A11, in B2 type:

=INDEX($A$2:$A$11,MATCH(0,COUNTIF($A$2:$A$11,"<"&$A$2:$A$11)-SUM(COUNTIF($A$2:$A$11,"="&B$1:B1)),0))

and press Ctrl+Shift+Enter not just Enter. If correctly entered Excel will surround this array formula with curly braces {}. Copy the formula down as far as necessary.
 
Upvote 0
If your data is in A2:A11, in B2 type:

=INDEX($A$2:$A$11,MATCH(0,COUNTIF($A$2:$A$11,"<"&$A$2:$A$11)-SUM(COUNTIF($A$2:$A$11,"="&B$1:B1)),0))

and press Ctrl+Shift+Enter not just Enter. If correctly entered Excel will surround this array formula with curly braces {}. Copy the formula down as far as necessary.

That's an awesome formula Andrew (y)
 
Upvote 0
If your data is in A2:A11, in B2 type:

=INDEX($A$2:$A$11,MATCH(0,COUNTIF($A$2:$A$11,"<"&$A$2:$A$11)-SUM(COUNTIF($A$2:$A$11,"="&B$1:B1)),0))

and press Ctrl+Shift+Enter not just Enter. If correctly entered Excel will surround this array formula with curly braces {}. Copy the formula down as far as necessary.

Thank you.
 
Upvote 0
If your data is in A2:A11, in B2 type:

=INDEX($A$2:$A$11,MATCH(0,COUNTIF($A$2:$A$11,"<"&$A$2:$A$11)-SUM(COUNTIF($A$2:$A$11,"="&B$1:B1)),0))

and press Ctrl+Shift+Enter not just Enter. If correctly entered Excel will surround this array formula with curly braces {}. Copy the formula down as far as necessary.
Thank you for your reply.

I am going to use the formula to list distinct values in column A as a source for data validation in column B?

Will this formula work for this purpose?
 
Upvote 0
Hi Andrew,

Great formula to sort the results. I am trying to figure out this formula works. Can you shed some light on how this formula works. What do the countif functions inside the formula seek to do?
Thanks,
Mike Szczesny
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

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