View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Ranking from multiple columns

try (asumes data starts in row2):

=RANK(D2,OFFSET($H$2,MATCH(A2,$A$2:$A$16,0)+MATCH( C2,$C$2:$C$16,0)-2,0,SUMPRODUCT(--($A$2:$A$16=A2),--($C$2:$C$16=C2)),1),0)

"Dallman Ross" wrote:

Given a workseeht table sort of like this:

B C D ... H
--- --- ---- ------
Buy 100 CACH @14.00
Buy 100 CACH @13.75
Buy 330 CACH @13.66
Buy 210 CAVM @23.66
Buy 220 CAVM @22.86
Buy 230 CHKP @22.03
Buy 270 CMVT @18.56
Buy 180 CREE @27.56
Buy 190 CREE @26.96
Buy 190 CREE @26.26
Buy 200 CSCO @25.46
Sell 30 CACH @22.53
Sell 220 CACH @21.66
Sell 230 CACH @20.80
Sell 240 CACH @19.94
...


I want to have a Column Q, such that each stock's Buy
or Sell orders are ranked by price. E.g.,

B C D ... H ... Q
--- --- ---- ------ ------
Buy 100 CACH @14.00 2 of 3
...
Sell 220 CACH @21.66 3 of 4

I imagine solutions might include SUMPRODUCT among Columns
B, D, and H, but I can't quite figure out how to do it.
Help would be most appreciated!

Dallman