cunningAce
Board Regular
- Joined
- Dec 21, 2017
- Messages
- 91
- Office Version
- 365
- Platform
- Windows
I am working with the following sample data.
[TABLE="width: 536"]
<colgroup><col><col><col span="6"></colgroup><tbody>[TR]
[TD]Product Code[/TD]
[TD]Category[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]rank[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Low[/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[TD]50[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]456[/TD]
[TD]Low[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]15[/TD]
[TD]20[/TD]
[TD]25[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]789[/TD]
[TD]Med[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]234[/TD]
[TD]Med[/TD]
[TD]3[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]567[/TD]
[TD]High[/TD]
[TD]100[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]345[/TD]
[TD]High[/TD]
[TD]20[/TD]
[TD]40[/TD]
[TD]60[/TD]
[TD]80[/TD]
[TD]100[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]678[/TD]
[TD]Low[/TD]
[TD]15[/TD]
[TD]30[/TD]
[TD]45[/TD]
[TD]60[/TD]
[TD]75[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Week No[/TD]
[TD]1[/TD]
[TD]Category[/TD]
[TD]Low[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have a sum product formula as below acting as a 'rank if' function based on the criteria from drop down list in D12, 'Category'
=IF(B2=$D$12,SUMPRODUCT(--($B$2:$B$8=$D$12),--(C2<$C$2:$C$8))+1,"")
This works fine but id like to add a second criteria, 'Week No' another drop down list in B12.
How would I update the formula; I assume the bit in red, so the rank column is determined by both category and weeks number selected from the drop down lists.
Thanks in advance
[TABLE="width: 536"]
<colgroup><col><col><col span="6"></colgroup><tbody>[TR]
[TD]Product Code[/TD]
[TD]Category[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]rank[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Low[/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[TD]50[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]456[/TD]
[TD]Low[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]15[/TD]
[TD]20[/TD]
[TD]25[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]789[/TD]
[TD]Med[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]234[/TD]
[TD]Med[/TD]
[TD]3[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]567[/TD]
[TD]High[/TD]
[TD]100[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]345[/TD]
[TD]High[/TD]
[TD]20[/TD]
[TD]40[/TD]
[TD]60[/TD]
[TD]80[/TD]
[TD]100[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]678[/TD]
[TD]Low[/TD]
[TD]15[/TD]
[TD]30[/TD]
[TD]45[/TD]
[TD]60[/TD]
[TD]75[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Week No[/TD]
[TD]1[/TD]
[TD]Category[/TD]
[TD]Low[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have a sum product formula as below acting as a 'rank if' function based on the criteria from drop down list in D12, 'Category'
=IF(B2=$D$12,SUMPRODUCT(--($B$2:$B$8=$D$12),--(C2<$C$2:$C$8))+1,"")
This works fine but id like to add a second criteria, 'Week No' another drop down list in B12.
How would I update the formula; I assume the bit in red, so the rank column is determined by both category and weeks number selected from the drop down lists.
Thanks in advance