View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Can I Rank on a second criteria if the first is equal?

This of RANK as counting the number of entries that are the entry you're
looking at. Breaking a tie means counting the number of entries that are
equal to the current entry, but have some other field whose value is greater
than the current entry's. That's roughly the logic behind this formula:
=COUNTIF($B$1:$B$13,""&B1)+1+SUMPRODUCT(--($B$1:$B$13=B1),--($C$1:$C$13C1)) (that's for row 1; autofill into subsequent rows)
I've assumed that the data is in rows 1:13, with the primary criterion in
column B and secondary in column C.

"CohenRB" wrote:

i am trying to rank sets of data on units ordered. Where the returned values
are the same i then need to rank on units delivered.

I.E. Over the 88 regions in question the ordered units for the quarter in
some cases are the same. I don't want to end up with some regions being
ranked the same so i need a kind of RANKIF option, so IF the RANK is the same
as any other then a second RANK based on a second criteria (in this case
units delivered) needs to be considered.

Maybe an easier example is to consider football, where teams are ranked by
the points they have accumulated. If the points are the same they are then
ranked on the goal difference.