# List unique values in alphabetical order



## KBFrench (Jan 2, 2023)

I have a form that needs to pull a list of unique values from a specified row on a data sheet that gets updated daily, exclude some based on criteria from another row, and list it in alphabetical order.  I found this formula that seems to do the trick:


```
=IFERROR(INDEX(HubSLAM!$D$2:$D$10000,MATCH(AGGREGATE(15,6,$U$3/(COUNTIF($L$2:L2,HubSLAM!$D$2:$D$10000)=0)/(HubSLAM!$D$2:$D$10000<>""),1),
$U$3/(COUNTIF($L$2:L2,HubSLAM!$D$2:$D$10000)=0)/(HubSLAM!$D$2:$D$10000<>"")/(HubSLAM!$C$2:$C$10000="OB Ground"),0)),"")
```



but it's insanely slow, and frankly I don't understand why it's dividing so many arrays by each other. Is there any way to do this that calculates faster?  Are the divides an array function, or an actual calculation?

Would that I could use "unique"! But I can't.  Our site is all on Excel 2019.  

The data when I pull it usually has about 8-10k lines, but it varies, so my solution has to accommodate blanks


----------



## AhoyNC (Jan 3, 2023)

Maybe this link using Power Query will help. Power Query is in Excel in the DATA ribbon and then Get and Transform.





This link has a different formula than what you are using, but not sure it would be faster. However COUNTIF function you are using can be slow
with large rows of data.


----------

