Using Rank formula with non consecutive rows

greykitten

New Member
Joined
Oct 9, 2013
Messages
2
Hello,
I'm trying to use the rank formula to retrieve the three largest values. However, the data that needs to be ranked is entered with a row in between each value. I can't figure out how the rank formula should be written (if even possible) to recognize and rank values on non-consecutive rows. I tried this formula =RANK(C20:C20,C22:C22,0)+COUNTIF(C20:C20,C22:C22,C20) with the C20:C20, C22:C22, etc representing single cells. My data looks like this below with a row in between. Thank you in advance for your help. I really appreciate it.

Thanks again,
grey kitten Value Rank
250 4

380 3

450 2

500 1
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello greykitten, welcome to MrExcel

Are the rows in between all blanks? If so then try this formula in row 20 copied down

=IF(C20="","",RANK(C20,C$20:C$26)+COUNTIF(C$20:C20,C20)-1)
 
Upvote 0
Ordinarily, that would work but I have other unrelated data in between the rows that I need to exclude. Below, the smaller numbers between 100-500 are the ones I need to rank and I need a formula to exclude the huge numbers in between.
Rank Values
4 100
$456,988
3 150
$1,234,222
2 200
$567,982
1 500


Thank you so much,
greykitten</SPAN>
</SPAN>
</SPAN>
</SPAN></SPAN>
</SPAN></SPAN>
</SPAN></SPAN>

<TBODY>
</TBODY><COLGROUP><COL span=2></COLGROUP>
 
Upvote 0
You can use RANK with a "union" instead of a range, so this formula in row 20

=RANK(C20,(C$20,C$22,C$24,C$26))

leave row 21 blank then select both of those cells (one with a the formula, one with the blank) and copy both down
 
Upvote 0

Forum statistics

Threads
1,216,069
Messages
6,128,608
Members
449,460
Latest member
jgharbawi

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