Article updated on July 30, 2017

Problem: How to rank by two columns? Column A are the "group" numbers and column B are the dates. See picture below. So all dates in group 1 should be ranked together, group 2 dates together and so on.


  1. Copy formula =SUM((B2>=$B$2:$B$16)*1*(A2=$A$2:$A$16)) into cell C2 and press "CTRL" + Shift" + "Enter"
  2. Copy the formula to cells below

Let us see what this formula does.


B2>=$B$2:$B$16 checks if cell value in B2 are bigger or equal than cell values in column B
A2=$A$2:$A$16 checks that only groups together are "summed" and ranked.