Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Retrieve Numeric Label for Max Value by Specific Day & Month

Try this:

A1 = lookup_date

=MATCH(MAX(INDEX(C5:H8,MONTH(A1),)),INDEX(C5:H8,MO NTH(A1),),0)

Biff

"Sam via OfficeKB.com" <u4102@uwe wrote in message
news:6e194d2957635@uwe...
Hi All,

I would like a flexible Formula to find the Maximum value for a specific
Day (1st, 2nd, 10th etc) & Month (criteria will vary) and retrieve its
corresponding Numeric Label from
Row "4" Column "C" : "AO"

Numeric Labels = Row4 Col "C" - "AO"
Data = Row5:Row16 Col "C" - "AO" - Numeric Values
Day = Row5:Row16 Col "A" - Full Date formatted with Custom Day Format
"dd": 1
- 31
Month = Row5:Row16 Col "B" - Full Date formatted with Custom Month Format
"mmm": Jan -
Dec.

Sample Data Layout:
Row4 Day Month 1 2 3 4 5 6
Row5 1 Jan 101 102 123 143 136 128
Row6 1 Feb 120 130 103 87 143 130
Row7 1 Mar 120 90 60 200 102 88
Row8 1 Apr 170 88 79 67 141 110


Expected Results:
Looking at 1st January, the maximum value is 143 and I would expect
Numeric
Label
4 to be returned as the correct answer.

Looking at 1 April, the maximum value is 170 and I would expect Numeric
Label 1 to be returned as the correct answer.

Thanks
Sam

--
Message posted via http://www.officekb.com



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Retrieve Numeric Label for Max Value by Specific Day & Month

Hi Biff,

Thanks for reply and assistance.

Unfortunately, I'm not getting the expected result.
In your Formula where you referenced MONTH twice, should one be referenced
DAY?
For the Numeric Label to be returned from Row "4", Column "C" - "AO" does
this range need to be explicitly referenced?

Further help appreciated.

Cheers,
Sam



T. Valko wrote:
Try this:


A1 = lookup_date


=MATCH(MAX(INDEX(C5:H8,MONTH(A1),)),INDEX(C5:H8,M ONTH(A1),),0)


Biff


--
Message posted via http://www.officekb.com

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Retrieve Numeric Label for Max Value by Specific Day & Month

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

"Sam via OfficeKB.com" <u4102@uwe wrote in message
news:6e19f88bf0bc4@uwe...
Hi Biff,

Thanks for reply and assistance.

Unfortunately, I'm not getting the expected result.
In your Formula where you referenced MONTH twice, should one be referenced
DAY?
For the Numeric Label to be returned from Row "4", Column "C" - "AO" does
this range need to be explicitly referenced?

Further help appreciated.

Cheers,
Sam



T. Valko wrote:
Try this:


A1 = lookup_date


=MATCH(MAX(INDEX(C5:H8,MONTH(A1),)),INDEX(C5:H8, MONTH(A1),),0)


Biff


--
Message posted via http://www.officekb.com



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Retrieve Numeric Label for Max Value by Specific Day & Month

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve Numeric Label for Max Value by Specific Month Sam via OfficeKB.com Excel Worksheet Functions 8 February 20th 07 06:10 AM
Find and Return Numeric Label based on (Numeric Value) Criterion Sam via OfficeKB.com Excel Worksheet Functions 2 September 18th 06 11:20 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
AVERAGE Row of Numbers and Return Corresponding Numeric Label Sam via OfficeKB.com Excel Worksheet Functions 14 September 20th 05 01:07 AM
How to convert a label to numeric quickcarl83 Excel Discussion (Misc queries) 3 June 1st 05 08:40 PM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"