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.
 
Hi Andrew -

I have been looking for a formula like this and this works great. I have one question for you - I cant seem to get this to work when my "a2:a11" range is numbers formatted as text, IE '012 '015 '001. This will give me the first value but the rest seem to crash and I get an #N/A error. Any thoughts on how to get around this?

Thanks!
Bob
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Andrew, this was a great formula and had worked for me (I had tried 2 other long formulas with no luck). Is there a way to order based on the count of the distinct values? - and/or use LARGE/SMALL function within this formula?

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.

Hi Andrew, could you post a bit of an explanation as to how it works? I'm strong on VBA but weak on formulas.
 
Upvote 0

Forum statistics

Threads
1,215,942
Messages
6,127,807
Members
449,408
Latest member
Bharathi V

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