New answers tagged


Please use the following query formula (adjusting ranges to your needs), instead of the filter one you already use. =QUERY(sort(P1:R,match(Q1:Q,{"Pending","admission","PCI"},0),TRUE), "where Col2 matches 'admission|PCI|pending' ",0) Functions used: QUERY SORT MATCH


The select clause identifies "Col1" and "count(Col1)". So try order by on "count(Col1)": "select Col1, count(Col1) where Col1 != '' group by Col1 order by count(Col1) label Col1 'Name', count(Col1) 'Count'"

Top 50 recent answers are included