SORT formula, exclude zeros

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have the following formula which works reasonably well for my purposes (column B contains names and column BL contains numbers):
Excel Formula:
=SORT(FILTER(CHOOSE({1,2},IMP!$B$2:$B$301,IMP!$BL$2:$BL$301),IMP!BL$2:$BL$301>=LARGE(IMP!$BL$2:$BL$301,10)),2,-1)
It returns data in the following format:
John11
Jack8
Jillian7
Joana5
Jakub0
Johannes0
Jedda0
...and then dozens of additional rows with names and zeros, this spills way too much and doesn't provide any added value.

Is it possible to update the formula so that it either
- excludes zeros (i.e. in the example above it would only return 4 initial entries) OR
- limits the # of entries to 10 (so that in the example above it returns 4 meaningful entries followed by 6 entries with zeros)?
THANKS...
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You can just add in another criterion to the Filter like this:

Excel Formula:
=SORT(FILTER(CHOOSE({1,2},IMP!$B$2:$B$301,IMP!$BL$2:$BL$301),(IMP!BL$2:$BL$301>=LARGE(IMP!$BL$2:$BL$301,10))*(IMP!BL$2:$BL$301>0)),2,-1)

or if you only have whole numbers to deal with, you could use:

Excel Formula:
=SORT(FILTER(CHOOSE({1,2},IMP!$B$2:$B$301,IMP!$BL$2:$BL$301),IMP!BL$2:$BL$301>=MAX(1,LARGE(IMP!$BL$2:$BL$301,10))),2,-1)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top