Rank by Sumifs

ryan640

Board Regular
Joined
Jan 14, 2015
Messages
75
Hello Everyone,

I am trying to rank a row by the total volume but have a few criteria. For the below example I would need to rank what project has the highest revenue however I cant just look at project. I also have to look at product and in scope vs out of scope.

I found a link to someone doing this with a sumif function but was unable to make it work with multiple criteria. Can someone help me adjust this formula to make it work for if I had 3 criteria?

=SUMPRODUCT((SUMIF(A$2:A$16,A$2:A$16,B$2:B$16)*(MATCH(A$2:A$16,A$2:A$16,0)=ROW(A$2:A$16)-ROW(A$2)+1)>SUMIF(A$2:A$16,A2,B$2:B$16))+0)+1

In ScopeClient :Project #ProductRevenueRank Me
yProject 1Product A$345.00
yProject 1Product A$1,769.00
nProject 1Product A$363.00
yProject 2Product A$314.00
yProject 2Product B$284.00
nProject 2Product B$190.00
yProject 2
Product B
$2,350.00
yProject 2
Product B
$164.00
yProject 4C$90.00
yProject 4C$38.00
yProject 4C$38.00
yProject 4C$20.00
yProject 4D$14.00
yProject 3D$113.00
yProject 5A$1,398.00


Link to the other post:
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about:
varios 24mar2022.xlsm
ABCDE
1In ScopeClient :Project #ProductRevenueRank Me
2yProject 1Product A$345.002
3yProject 1Product A$1,769.002
4nProject 1Product A$363.004
5yProject 2Product A$314.005
6yProject 2Product B$284.001
7nProject 2Product B$190.006
8yProject 2Product B$2,350.001
9yProject 2Product B$164.001
10yProject 4C$90.007
11yProject 4C$38.007
12yProject 4C$38.007
13yProject 4C$20.007
14yProject 4D$14.009
15yProject 3D$113.008
16yProject 5A$1,398.003
Hoja7
Cell Formulas
RangeFormula
E2:E16E2=SUMPRODUCT((SUMIFS(D$2:D$16,A$2:A$16,A$2:A$16,B$2:B$16,B$2:B$16,C$2:C$16,C$2:C$16)*(MATCH(A$2:A$16&"|"&B$2:B$16&"|"&C$2:C$16,A$2:A$16&"|"&B$2:B$16&"|"&C$2:C$16,0)=ROW(C$2:C$16)-ROW(C$2)+1)>SUMIFS(D$2:D$16,A$2:A$16,A2,B$2:B$16,B2,C$2:C$16,C2))+0)+1
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, if you have a recent version with dynamic array functions and the LET function, and assuming the results shown in post #2 are what you want, you can do this with a single formula in a single cell (no need to copy down).

22 03 25.xlsm
ABCDE
1In ScopeClient :Project #ProductRevenueRank Me
2yProject 1Product A$345.002
3yProject 1Product A$1,769.002
4nProject 1Product A$363.004
5yProject 2Product A$314.005
6yProject 2Product B$284.001
7nProject 2Product B$190.006
8yProject 2Product B$2,350.001
9yProject 2Product B$164.001
10yProject 4C$90.007
11yProject 4C$38.007
12yProject 4C$38.007
13yProject 4C$20.007
14yProject 4D$14.009
15yProject 3D$113.008
16yProject 5A$1,398.003
Rank Sumifs
Cell Formulas
RangeFormula
E2:E16E2=LET(ca,A2:A16,cb,B2:B16,cc,C2:C16,z,"|",j,ca&z&cb&z&cc,u,UNIQUE(j),p,FIND(z,u),q,FIND(z,u,p+1), si,SUMIFS(D2:D16,ca,LEFT(u,p-1),cb,MID(u,p+1,q-p-1),cc,REPLACE(u,1,q,"")),MATCH(j,SORTBY(u,si,-1),0))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,545
Messages
6,125,450
Members
449,227
Latest member
Gina V

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