Home > Enterprise >  List non-unique entries and their counts sorted in descending order
List non-unique entries and their counts sorted in descending order

Time:11-17

If I have a list of names in a sheet for example:

First Name|Last Name|Something else|
Maria|Miller|...|
John|Doe|...|
Maria|Smith|...|
Marc|Meier|...|
Marc|Park|...|
Maria|Muster|...|
Selene|Mills|...|
Adam|Broker|...|

And then I want a second sheet which then shows the list of non-unique first names and their count, and the list being in descending order. So in this example that would be:

First Name|Count
Maria|3
Marc|2

What I found was this example enter image description here

CodePudding user response:

I think this should work if your headers are in row 1.

=QUERY(QUERY(Sheet1!A:A,"select Col1,COUNT(Col1) where Col1<>'' group by Col1",1),"where Col2>1 label Col2'Count'",1)
  • Related