Posted to microsoft.public.excel.worksheet.functions
|
|
Retrieve Numeric Label for Max Value by Specific Day & Month
You're welcome. Thanks for the feedback!
Biff
"Sam via OfficeKB.com" <u4102@uwe wrote in message
news:6e1b12aba299a@uwe...
Hi Biff,
Thank you very much for explanation and sample file.
Your Formula as is does provide the required result. Great!
A1 = lookup_date
=MATCH(MAX(INDEX(C5:H8,MONTH(A1),)),INDEX(C5:H8,MO NTH(A1),),0)
I tried to reference the DAY separately which returned the incorrect
result:
=MATCH(MAX(INDEX(C5:H8,MONTH(A1),)),INDEX(C5:H8,DA Y(A1),),0)
Cheers
Sam
T. Valko wrote:
In your Formula where you referenced MONTH twice, should one be
referenced
DAY?
No. MATCH returns the relative position.
Since your DAY headers are sorted ascending *and* your month headers are
also sorted ascending we only need to find the relative position of the
month.
For the Numeric Label to be returned from Row "4", Column "C" - "AO"
does
this range need to be explicitly referenced?
Again, no, for the same reason as stated above. We only need to find the
relative position of the DAY and, since they're sorted ascending we don't
actually need to reference that physical range.
Here's a sample file based on your posted data:
Sam.xls 14kb
http://cjoint.com/?cuu20MDM1I
Biff
--
Message posted via http://www.officekb.com
|