Hi,

I am trying to rank the numbers if it falls under the same date and category.


Column C: Date Column J: Category Column O: Count Column P: Desired Rank Outcome
Aug 2014 Coats 50 2
Aug 2014 Coats 50 2
Aug 2014 Coats 50 2
Aug 2014 Jeans 100 1
Sep 2014 Coats 25 3
Sep 2014 Jeans 50 2
Sep 2014 Sweaters 75 1


After searching for solutions, it seems like I should use sumproduct or the countifs formula so I tried the following but I couldn't get it to work.
=COUNTIFS($C:$C,$C2,$J:$J,$J2,$O:$O,">"&$O2)+COUNTIFS($C:$C,$C2,$J:$J,$J2,$O:$O,$O2) just counts the amount of times it appears so it will give me 3 instead of 2 for coats in Aug 2014.

=1+SUMPRODUCT(($C$2:$C$88=C2)*($J$2:$J$88=J2)*($O$2:$O$88>O2)) only gives me 1 for all the rows because the sumproduct part is just giving me 0s.

What am I missing? Should I be using a different formula altogether? Thanks!