List unique values alphabetically

eduzs

Well-known Member
Joined
Jul 6, 2014
Messages
704
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hello,
I have this formula that works fine to list in alphabetical order:

=IFERROR(INDEX(B$3:B$11,AGGREGATE(15,6,(ROW(B$3:B$11)-ROW(B$3)+1)/(B$3:B$11<>""),ROWS(D$3:D3))),"")

Could anyone help me to adapt this formula so that it also returns only unique values?
I need it not to be a array formula.

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi,

That formula itself does nothing to "list in alphabetical order", but simply returns non-blanks. So unless the original entries are already in alphabetical order, I'm not sure what you mean.

Can you clarify?

Regards
 
Upvote 0
Sorry, the formula above actually return non blanks.
I need a non array formula that list unique values alphabetically.
Thanks
 
Upvote 0
This is the array formula that do what I need (list unique values in alphabetical order):

{=IFERROR(INDEX($C$2:$C$151,MATCH(0,COUNTIF($C$2:$C$151,"<"&$C$2:$C$151)-SUM(COUNTIF($C$2:$C$151,"="&E$1:E1)),0)),"-")}

The problem is that I want to share this workbook and excel returns an error that says array formulas are not accepted in the shared workbook.

Thanks
 
Upvote 0
That formula will not work on its own, but requires an initial entry to be inserted into cell E1, I believe, which perhaps you should have shared with us.

Anyway, a non-CSE version of that formula is:

=IFERROR(INDEX(C$2:C$151,MATCH(0,INDEX(COUNTIF(C$2:C$151,"<"&C$2:C$151)-SUMPRODUCT(COUNTIF(C$2:C$151,E$1:E1)),),0)),"-")

Regards
 
Upvote 0
Superb! Works like a charm. Thanks a lot.
 
Upvote 0
Just one more question, how can I modify the formula to ignore blank cells in range C$2:C$151?
Thanks
 
Upvote 0
Just one more question, how can I modify the formula to ignore blank cells in range C$2:C$151?

That formula does currently ignore blank cells, if by blank you mean empty. If those 'blanks' actually contain the null string (""), e.g. as a result of formulas in those cells, you'll need:

=IFERROR(INDEX(C$2:C$151,MATCH(0,INDEX(COUNTIFS(C$2:C$151,"<>",C$2:C$151,"<"&C$2:C$151)-COUNTIF(C$2:C$151,"")-SUMPRODUCT(COUNTIF(C$2:C$151,E$1:E1)),),0)),"-")

If the range potentially contains both 'genuine' blanks and null strings then you'll require a different set-up.

Of course, you may well need to change your formula in E1 as well, though not having seen that one I couldn't say for sure.

Regards
 
Upvote 0

Forum statistics

Threads
1,214,615
Messages
6,120,538
Members
448,970
Latest member
kennimack

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