# One Ranking for Multiple Ranges

#### AboveBeyond

##### Board Regular
Example:

1. 50
2. 75
3. 35
4. =sum(A1:A3)
5. 22
6. 99
7. 48
8. =sum(A5:A7)

It would rank rows 1-3 and 5-7 and not rows 4&8 because I don't want the sums ranked.

Thanks!

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### Domenic

##### MrExcel MVP
If the format is consistent, that is, 3 rows of numbers and a sum, try the following...

B1, copied down:

=IF(MOD(ROW()-ROW(\$A\$1),4)+1<4,SUM(IF(MOD(ROW(\$A\$1:\$A\$8)-ROW(\$A\$1),4)+1<4,IF(A1<\$A\$1:\$A\$8,1)))+1,"")

...confirmed with CONTROL+SHIFT+ENTER

If the format is not consistent, replace...

=SUM(A1:A3)

and

=SUM(A5:A7)

with

=SUBTOTAL(9,A1:A3)

and

=SUBTOTAL(9,A5:A7)

B1, copied down:

=IF(SUBTOTAL(3,A1),SUM(IF(SUBTOTAL(3,OFFSET(\$A\$1:\$A\$8,ROW(\$A\$1:\$A\$8)-ROW(\$A\$1),0,1)),IF(A1<\$A\$1:\$A\$8,1)))+1,"")

...confirmed with CONTROL+SHIFT+ENTER

Note that both formulas will rank from highest to lowest, and will return the following result...

50 3
75 2
35 5
160
22 6
99 1
48 4
169

Hope this helps!

Replies
1
Views
185
Replies
13
Views
100
Replies
3
Views
144
Replies
1
Views
219
Replies
3
Views
27

1,191,501
Messages
5,986,927
Members
440,067
Latest member
Swatts1

### 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.

### Which adblocker are you using?

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

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