I used the formula below to get the last monthly price of an item
={LOOKUP(9.9999999E+307,CHOOSE({1,2},0,LOOKUP(2,1/((Market!$I$2:$I$9998<>"")*(TEXT(Market!$A$2:$A$9998,"mmm-yyyy")=B11&"-"&A11)),Market!$I$2:$I$9998)))}
In fact, I have 2 separate columns for year and month (referenced by B11 and A11) and the values are on a separate sheet.
The formula works great but now, I would like to do the same thing but return the largest value of each month without having to change the formula.
For example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Thursday, May 11, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Friday, May 12, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Monday, May 15, 2006[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Tuesday, May 16, 2006[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Wednesday, May 17, 2006[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Thursday, May 18, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Friday, May 19, 2006[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 153"]
<colgroup><col></colgroup><tbody></tbody>[/TABLE]
Based on the table below, the formula should return the value of 10. I can't simply use max because the days can change.
Is it possible? If not, what is the best dynamic formula, assuming that the days can change in the separate sheet.
Thank you!!!!!!
={LOOKUP(9.9999999E+307,CHOOSE({1,2},0,LOOKUP(2,1/((Market!$I$2:$I$9998<>"")*(TEXT(Market!$A$2:$A$9998,"mmm-yyyy")=B11&"-"&A11)),Market!$I$2:$I$9998)))}
In fact, I have 2 separate columns for year and month (referenced by B11 and A11) and the values are on a separate sheet.
The formula works great but now, I would like to do the same thing but return the largest value of each month without having to change the formula.
For example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Thursday, May 11, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Friday, May 12, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Monday, May 15, 2006[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Tuesday, May 16, 2006[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Wednesday, May 17, 2006[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Thursday, May 18, 2006[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Friday, May 19, 2006[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 153"]
<colgroup><col></colgroup><tbody></tbody>[/TABLE]
Based on the table below, the formula should return the value of 10. I can't simply use max because the days can change.
Is it possible? If not, what is the best dynamic formula, assuming that the days can change in the separate sheet.
Thank you!!!!!!