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
 
Try this one then

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

/Skovgaard

Skovgaard, this one worked.

Funny, because I had tried a similar formula, that wasn't working as I intended...

Well, many thanks to you
 
Upvote 0

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.
Try this one then

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

/Skovgaard

Skovgaard, now, this one doesn't ignore tha blank cell...

I'm starting to think that this cant be solved that easy and maybe I will need to create conditions in the formula to not have the empty cells in the rank.eq range.

Will try some things
 
Upvote 0
Ok, found the solution.

The totals that I'm ranking, are calculated by a SUM formula, and that was the problem.

So, I had to change the formula to:

=(IF(AND(J13:J31=0);"";SUM(J13:J31))

Then, my ranking looks like this:

=IF(J32="";"";RANK.EQ(J32;$J$32:$AS$32;1)+COUNTIF($J$32:J32;J32)-1)

This way, everything works as expected, empty cells are ignored, and I don't have a repeated ranking.

Thanks for the help
 
Upvote 0
Solution

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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