View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Possible array formula?

"Jason" wrote...
ID Side Size Type Price OCA Status
2345254 Buy 1 Lmt 103.3125 OCA Open
2345255 Sell 1 Lmt 103.34375
2345256 Sell 2 Lmt 103.5
2345257 Buy 2 Stop 103.5 OCA
2345258 Sell 2 Lmt 103.5
2345259 Buy 2 Stop 103.53125 OCA Open
2345260 Buy 2 Lmt 103.53125 OCA Open
2345261 Buy 1 RS 103.53125 OCA
2345262 Sell 1 RS 103.53125
2345263 Sell 2 RS 103.53125 Open
2345264 Sell 2 RS 103.625
2345265 Buy 3 Lmt 102.625
2345266 Buy 3 Lmt 103.28125 Open

....
With this data table how in excel can I find the record
with the lowest ID with a price of 103.53125 and a status of open?


If you data were in A1:G14, and if the table were sorted on ID in ascending
order already, the following array formula will give the ID number you seek.

=INDEX(A2:A14,MATCH(1,(E2:E14=A17)*(G2:G14=B17),0) )

If the table weren't sorted on ID, try the array formula

=MIN(IF((E2:E14=A17)*(G2:G14=B17),A2:A14))