Google-sheets – Google Sheet hide emtpy cells

google sheets

So I have a simple formula I use for my tabletop game.
I have Player names in A2-A26 and their turn number in B2-B26
In E2 I have the formula

=Sort(A2:B26,B2:B26,False)

Now this makes a list of highest turn number on top and going down to lowest.
However it shows every player in the list as well.
Some turns only 5 players are participating. So I would like for only those 5 players to show up in the E2 cell and downwards.
The players who do not have turn number will have a blank cell in B2-B26
I have tried using filtering. But I can't seem to get it working.

Best Answer

Query is the easiest way to accomplish this:

=query(A:B,"select * where B is not null order by B desc")