I have two formulae, both gleaned at different times from the helpful crowd here. What I am trying to do is get the alphabetised result that the first (array) formula offers, but adapted to work on filtered data like the second (non-array) formula that I am currently using.
Formula 1 (in D936):
=IFERROR(INDEX(SEF_Data_2018[TchGrp],MATCH(,COUNTIF(SEF_Data_2018[TchGrp],"<"&SEF_Data_2018[TchGrp])+9^9*(SEF_Data_2018[TchGrp]="")-SUM(COUNTIF(SEF_Data_2018[TchGrp],D$935:D935)),)),"")
Formula 2 (in C936):
=IFERROR(INDEX(SEF_Data_2018[TchGrp],MATCH(1,INDEX(SUBTOTAL(3,OFFSET(SEF_Data_2018[[#Headers],[TchGrp]],ROW(SEF_Data_2018[School ID])-3,))*(0=COUNTIF($C$935:C935,SEF_Data_2018[TchGrp])),),)),"")
The second formula will produce an alphabetical list if the data is sorted on the teaching group (TchGrp) column, but the data will not always be sorted that way, nor can it always be.
What I would like is a list of unique values that are visible in the table when the list is filtered that will always present itself alphabetically. Teaching group codes are always text (essentially a mixture of numbers and text).
I have attached a sample file - you'll need to scroll down to row 935 to see the formulae. The slicer is top right. I would like a formula, not VBA, PQ or advanced filters in this case.
Thank you to anyone who can see how to combine the functionality of the two formulae I have already!![]()
Bookmarks