Rank IF Ascending Order

dversloot1

Board Regular
Joined
Apr 3, 2013
Messages
113
Hello,

I'm trying to rank in ascending order the top 20 lowest margin generating items by week. I'm stumped on what sort of formula to use for this.
I will have a data tab consisting of historical data from previous weeks. I would like to be able to call out the top 20 margin loss drivers by week using a Selected week from a drop down menu.

Any ideas on what the formula should be for the rank column by week?

Rank Week Margin Product
? 1 $96 A
? 1 $54 B
? 1 $88 C
? 2 $22 A
? 2 $36 B
? 2 $31 C
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello,

I'm trying to rank in ascending order the top 20 lowest margin generating items by week. I'm stumped on what sort of formula to use for this.
I will have a data tab consisting of historical data from previous weeks. I would like to be able to call out the top 20 margin loss drivers by week using a Selected week from a drop down menu.

Any ideas on what the formula should be for the rank column by week?

Rank Week Margin Product
? 1 $96 A
? 1 $54 B
? 1 $88 C
? 2 $22 A
? 2 $36 B
? 2 $31 C

Try to formulate the problem in terms of the sample you posted and post the expected results.
 
Upvote 0
Try to formulate the problem in terms of the sample you posted and post the expected results.

I believe this ranks the margin in descending order, not Ascending:
A2=SUMPRODUCT(--(B$2:B$7=B2)*(C2<C$2:C$7))+1

Expected Results:

Rank Week Margin Product
3 1 $96 A
1 1 $54 B
2 1 $88 C
1 2 $22 A
3 2 $36 B
2 2 $31 C
 
Upvote 0
I believe this ranks the margin in descending order, not Ascending:
A2=SUMPRODUCT(--(B$2:B$7=B2)*(C2<c$2:c$7))+1

Expected Results:

Rank Week Margin Product
3 1 $96 A
1 1 $54 B
2 1 $88 C
1 2 $22 A
3 2 $36 B
2 2 $31 C

Either...

</c$2:c$7))+1
=SUMPRODUCT(--($B$2:$B$7=B2),--(C2>$C$2:$C$7))+1

Or...

=COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,"<"&C2)+1

<c$2:c$7))+1



</c$2:c$7))+1
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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