Search code examples
excelranking

Excel Ranking with multiple conditions


enter image description herehttps://www.dropbox.com/s/05f82d5piw0pfd2/Book1.xls

Hello everyone, can anyone show me how to deal with above ranking issue that I try to solve.

What I like to have is only ranking Names Occurrence when Month = February and Item = Item 1, also, ignore all item 2 with what even names and months between it.

Also, since I have more records, if possible could you please tell me how to apply ranking to whole columns.

Currently I try to use

 =SUMPRODUCT(--(A:A=A2),--(C:C=C2),--(B:B=B2)--(D2=D:D))`

but looks like it doesn't work that way.


Solution

  • Add a helper column in column E (which can later be hidden) that screens out the rows you want to exclude:

     =IF(AND(A2="Item 1",C2="February"),D2,"")
    

    which would of course be copied down to the bottom of your data.

    Then do the ranking in column F of the formula results in column E:

     =IFERROR(RANK(E2,E:E),"")
    

    again copied down to the end of the data.