Conditional array search

ehcpieterse

Active Member
Joined
Nov 16, 2006
Messages
278
Hi,

I have been able to use an array function to search for a conditional max value:

{=MAX(IF(MyRange=TestValue,LookupRange))}

Given the data below (apologies for the formatting) how do I return the corresponding value in the 3rd column (AvgPx), given that I used the formula above to return the conditional max in the 2nd column (CumQty)?


OrderID CumQty AvgPx
1,FixClient,6394807088963162 0 0
2,FixClient,6394807122184812 0 0
1,FixClient,6394807088963162 0 0
2,FixClient,6394807122184812 0 0
2,FixClient,6394807122184812 2201 3407
1,FixClient,6394807088963162 201 4387
2,FixClient,6394807122184812 2206 3406.959202
1,FixClient,6394807088963162 206 4362.776699
2,FixClient,6394807122184812 2229 3406.77389
1,FixClient,6394807088963162 229 4264.973799
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
One way:


Excel 2010
ABCDEF
1OrderIDCumQtyAvgPx2,FixClient,63948071221848123406.77389
21,FixClient,6394807088963162001,FixClient,63948070889631624264.973799
32,FixClient,639480712218481200
41,FixClient,639480708896316200
52,FixClient,639480712218481200
62,FixClient,639480712218481222013407
71,FixClient,63948070889631622014387
82,FixClient,639480712218481222063406.959202
91,FixClient,63948070889631622064362.776699
102,FixClient,639480712218481222293406.77389
111,FixClient,63948070889631622294264.973799
Sheet1
Cell Formulas
RangeFormula
F1=INDEX(C$2:C$11,MATCH(MAX(INDEX((A$2:A$11=E1)*(B$2:B$11),)),INDEX((A$2:A$11=E1)*(B$2:B$11),),FALSE))
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top