Ranking ignoring blank cells

Beneindias

Board Regular
Joined
Jun 21, 2022
Messages
120
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hey again, guys.

I have a new problem, that I can´t get to the solution after trying a lot of formulas, and being stuck to this for a day.

So, I have an excel file where I compare several quotes to make a decision.
I have spaces to compare nine quotes, but I don't always get nine, leaving some blank.

Thats where my problems begin.

I'm trying to have them ranked with a formula, but I'm not able to ignore the blank cells and they end up being ranked as well.

I have this formula:

=IF(J32;RANK.EQ(J32;($J$32;$O$32;$T$32;$Y$32;$AD$32;$AI$32;$AN$32;$AS$32;$AX$32);1)+COUNTIF($J$32:J32;J32)-1;"")


This one takes care of repeated rankings and all that, but it does not take care of blank cells, considering them the first ranks.
The cell that shows the ranking stays blank, but it is still ranked and I need this formula to completely ignore blank cells


Thanks to all of you
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I think you need to show, I tried below and as you can see, it ignores blanks.

Book1
AB
1NumberRank
216
325
4#N/A
534
643
7#N/A
852
961
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=RANK.EQ(A2,$A$2:$A$9)



/Skovgaard
 
Upvote 0
I think you need to show, I tried below and as you can see, it ignores blanks.

Book1
AB
1NumberRank
216
325
4#N/A
534
643
7#N/A
852
961
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=RANK.EQ(A2,$A$2:$A$9)



/Skovgaard
If I have data in a range like that, it works, but it's not working in my file.
I suspect that the problem is because my formula is trying to rank cells that are also formulas...maybe thats why i'm having problems with this.

Cell Formulas
RangeFormula
J13:J31,AX13:AX31,AS13:AS31,AN13:AN31,AI13:AI31,AD13:AD31,Y13:Y31,T13:T31,O13:O31J13=$D13*G13*(1-H13)*(1-I13)
K13K13=IF(E13=0,"",IF(G13=0,"",J13/$F13-1))
K14:K31,AY13:AY31,AT13:AT31,AO13:AO31,AJ13:AJ31,AE13:AE31,Z13:Z31,U13:U31,P13:P31K14=IF($E14=0,"",IF(G14=0,"",J14/$F14-1))
J32,F32,AX32,AS32,AN32,AI32,AD32,Y32,T32,O32J32=SUM(J13:J31)
K32,AY32,AT32,AO32,AJ32,AE32,Z32,U32,P32K32=IF($F32=0,"",(J32/$F$32-1))
D15D15=42-18
F13:F22,F24:F31F13=+E13*D13
K39,AY39,AT39,AO39,AJ39,AE39,Z39,U39,P39K39=IF(J32,RANK.EQ(J32,$J$32:$AX$32,1)+COUNTIF($J$32:J32,J32)-1,"")
 
Upvote 0
I tried to paste your Mini Sheet and wrote below formula in J41.
Is ranking 4 the correct result for J32?


1665650129832.png


/Skovgaard
 
Upvote 0
Ok, then try this:

Excel Formula:
=IF(J32=0,"",RANK.EQ(J32,$J$32:$AX$32,1)-COUNTIF($J$32:$AX$32,0))

/Skovgaard
 
Upvote 0
Ok, then try this:

Excel Formula:
=IF(J32=0,"",RANK.EQ(J32,$J$32:$AX$32,1)-COUNTIF($J$32:$AX$32,0))

/Skovgaard
So, my problem was in the countif part.
This one worker like a charm.


Thank you very much...my problem is solved thansk to you.
 
Upvote 0
Ok, then try this:

Excel Formula:
=IF(J32=0,"",RANK.EQ(J32,$J$32:$AX$32,1)-COUNTIF($J$32:$AX$32,0))

/Skovgaard
Well, actualy, now I have a probelm that I had solved in my old rank formula.

This formula that you wrote, gives me the same ranking when I have a quote with the same price, and then it skips the same number of ranks..

So, I tried it in an old comparison that I have here, and i'm getting rank 1, 2, 2, 2, 5, 6, 7, 8 and 9.

I should have rank 1, 2, 3, 4, 5, 6, 7, 8, 9. Or, if it's not possible to do that, at least I should have 1, 2, 2, 2, 3, 4, 5, 6 and 7.
 
Upvote 0
Try this one then

Excel Formula:
=RANK.EQ(J32,$J$32:$AS$32)+COUNTIF($J$32:J32,J32)-1

/Skovgaard
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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