Ignoring Blanks and get top 20

zinah

Active Member
Joined
Nov 28, 2018
Messages
368
Office Version
  1. 365
Platform
  1. Windows
Hi,

I managed to use below formula to ignore blank and it worked, what I need now is how to get the top 20 or any top (any figure). I'm using below table as an example data:

Formula I used :
Excel Formula:
=UNIQUE(SORT(FILTER(Sheet1!$CQ$15:$CS$7241,Sheet1!$CR$15:$CR$7241<>""),3,-1))

Real data range in my file: Sheet1!$CQ$15:$CS$7241
The real count column range in my below example is: Sheet1!$CR$15:$CR$7241

Org​
Com​
Count​
CS​
CCC​
60​
Results
CS​
PIPPP​
48​
Top​
20
IT​
Mercado Libre​
44​
CS​
SYSY​
35​
IT​
FireEye​
33​
CS​
WWW​
26​
IT​
OROOR​
24​
CS​
OROOR​
20​
CS​
OFOF​
20​
CS​
UNUN​
20​
IT​
ZZZ​
19​
CS​
FTFT​
18​
IT​
AAA​
17​
IT​
Globant​
16​
CS​
UUU​
16​
CS​
OOO​
15​
CS​
TTT​
15​
CS​
ZZZ​
15​
Finance​
AAA​
15​
CS​
DDD​
15​
HR​
AAA​
14​
IT​
Incluit​
14​
Finance​
CCC​
14​
IT​
Johnson Controls​
14​
CS​
VEVA​
14​
IT​
WWW​
13​
CS​
zScaler​
13​
CS​
AAA​
13​
IT​
SSS​
11​
CS​
Forescout​
11​
IT​
TTT​
11​
IT​
BlueVoyant​
11​
IT​
EEE​
11​
CS​
Tenable Systems​
10​
CS​
Nutanix​
10​
IT​
Tarjeta Naranja​
10​
HR​
RRR​
9​
Finance​
TTT​
9​
CS​
FireEye​
9​
IT​
CCC​
9​
CS​
Cylance​
8​
HR​
BBB​
8​
Finance​
LLL​
8​
CS​
SonicWall​
8​
CS​
QQQ​
8​
Finance​
Forescout​
8​
Finance​
WWW​
8​
Finance​
NetSkope​
8​
IT​
OFOF​
8​
IT​
KKK​
7​
CS​
Check Point​
7​
IT​
DDD​
7​
CS​
Quest​
7​
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try this

FYTD_App_by_Citizenship_T8_+_T42 (6).xlsx
ABCDEFGHIJK
1OrgComCountResultsOrgComCount
2CSCCC60Top20CSCCC60
3CSPIPPP48CSPIPPP48
4ITMercado Libre44ITMercado Libre44
5CSSYSY35
6ITFireEye33
7CSSYSY35CSWWW26
8ITFireEye33ITOROOR24
9CSWWW26CSOROOR20
10ITOROOR24CSOFOF20
11CSOROOR20CSUNUN20
12CSOFOF20ITZZZ19
13CSUNUN20CSFTFT18
14ITZZZ19ITAAA17
15CSFTFT18ITGlobant16
16ITAAA17CSUUU16
17ITGlobant16CSOOO15
18CSUUU16CSTTT15
19CSOOO15CSZZZ15
20CSTTT15FinanceAAA15
21CSZZZ15CSDDD15
22FinanceAAA15
23CSDDD15
24HRAAA14
25ITIncluit14
26FinanceCCC14
27ITJohnson Controls14
28CSVEVA14
29ITWWW13
30CSzScaler13
31CSAAA13
32ITSSS11
33CSForescout11
34ITTTT11
35ITBlueVoyant11
36ITEEE11
37CSTenable Systems10
38CSNutanix10
39ITTarjeta Naranja10
40HRRRR9
41FinanceTTT9
42CSFireEye9
43ITCCC9
44CSCylance8
45HRBBB8
46FinanceLLL8
47CSSonicWall8
48CSQQQ8
49FinanceForescout8
50FinanceWWW8
51FinanceNetSkope8
52ITOFOF8
53ITKKK7
54CSCheck Point7
55ITDDD7
56CSQuest7
Sheet6
Cell Formulas
RangeFormula
I2:K21I2=LET(tbl,FILTER(A2:C56,A2:A56<>"",""),top,UNIQUE(LARGE(INDEX(tbl,,3)+0,SEQUENCE(G2))),mtch, IF(ISNA(MATCH(INDEX(tbl,,3),top,0)),FALSE,TRUE),FILTER(tbl,mtch,""))
Dynamic array formulas.
 
Upvote 0
Try this

FYTD_App_by_Citizenship_T8_+_T42 (6).xlsx
ABCDEFGHIJK
1OrgComCountResultsOrgComCount
2CSCCC60Top20CSCCC60
3CSPIPPP48CSPIPPP48
4ITMercado Libre44ITMercado Libre44
5CSSYSY35
6ITFireEye33
7CSSYSY35CSWWW26
8ITFireEye33ITOROOR24
9CSWWW26CSOROOR20
10ITOROOR24CSOFOF20
11CSOROOR20CSUNUN20
12CSOFOF20ITZZZ19
13CSUNUN20CSFTFT18
14ITZZZ19ITAAA17
15CSFTFT18ITGlobant16
16ITAAA17CSUUU16
17ITGlobant16CSOOO15
18CSUUU16CSTTT15
19CSOOO15CSZZZ15
20CSTTT15FinanceAAA15
21CSZZZ15CSDDD15
22FinanceAAA15
23CSDDD15
24HRAAA14
25ITIncluit14
26FinanceCCC14
27ITJohnson Controls14
28CSVEVA14
29ITWWW13
30CSzScaler13
31CSAAA13
32ITSSS11
33CSForescout11
34ITTTT11
35ITBlueVoyant11
36ITEEE11
37CSTenable Systems10
38CSNutanix10
39ITTarjeta Naranja10
40HRRRR9
41FinanceTTT9
42CSFireEye9
43ITCCC9
44CSCylance8
45HRBBB8
46FinanceLLL8
47CSSonicWall8
48CSQQQ8
49FinanceForescout8
50FinanceWWW8
51FinanceNetSkope8
52ITOFOF8
53ITKKK7
54CSCheck Point7
55ITDDD7
56CSQuest7
Sheet6
Cell Formulas
RangeFormula
I2:K21I2=LET(tbl,FILTER(A2:C56,A2:A56<>"",""),top,UNIQUE(LARGE(INDEX(tbl,,3)+0,SEQUENCE(G2))),mtch, IF(ISNA(MATCH(INDEX(tbl,,3),top,0)),FALSE,TRUE),FILTER(tbl,mtch,""))
Dynamic array formulas.

I reliaze that I don't have "LET" function in my Office 365 version any alternative solution?
 
Last edited:
Upvote 0
You can do that the same way as you did here Top 25 Companies
The problem is I couldn't link this condition
Excel Formula:
=FILTER(Sheet1!$CQ$15:$CS$7241,Sheet1!$CR$15:$CR$7241<>"")
to my Top 25 formula
Excel Formula:
UNIQUE(SORT(FILTER(FILTER(Sheet1!$BA:$CM,Sheet1!$CM:$CM>=LARGE(Sheet1!$CM:$CM,Sheet2!$G$2)),{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}),3,-1))
 
Upvote 0
That's not the post I linked to. ;)
Like
Excel Formula:
=INDEX(UNIQUE(SORT(FILTER($CQ$15:$CS$7241,$CR$15:$CR$7241<>""),3,-1)),SEQUENCE(CX16),{1,2,3})
 
Upvote 0
Solution
That's not the post I linked to. ;)
Like
Excel Formula:
=INDEX(UNIQUE(SORT(FILTER($CQ$15:$CS$7241,$CR$15:$CR$7241<>""),3,-1)),SEQUENCE(CX16),{1,2,3})
You ROCK!
I cannot thank you enough, it worked (y)✌️
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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