Posted to microsoft.public.excel.worksheet.functions
|
|
Test if a date falls within a given range of dates in Excel?
Hi,
I can see the attachment in the reply. I you still cannot, please feel free
to write in to me at .
--
Regards,
Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com
"lindaledb" wrote in message
...
I don't see an attachment. Am I missing something? Thanks for providing
some solutions. I look forward to reviewing them.
Sincerely,
Derrick
"Ashish Mathur" wrote:
Hi,
Please find attached my workbook in which I have presented 3
alternatives.
Hope these help.
Anxiously awaiting your feedback.
--
Regards,
Ashsih Mathur
www.ashishmathur.com
"lindaledb" wrote in message
...
On second thought.....
After testing this further and looking at the code you suggested, I see
that
in the formula you provided =INDEX(A4:A9,MATCH(B2,B4:B9,-1)) that it is
only
looking up the dates in column B. I tried expanding that to B4:C9, but
that
messes everything up.
Each age division has its own date range. For example, a Junior must
have
been born between 9/1/2000 and 8/31/1997 (as seen in cells B6 and C6).
I'm
not all that familiar with Index and Match, so when you suggested the
range
of B4:B9, I'm assuming that Excel is looking from 9/1/2008 to 9/1/1989
instead of each individual row's range???? Am I making sense?
Is there an easier way to organize this or to alter the formula?
Again, thanks for your (or other's) suggestions!
"Glenn" wrote:
lindaledb wrote:
I am trying to test if an individual's birthdate falls within any of
the
given age division date ranges. I would like for it to output the
age
division name. Below is a chart showing the current fields on my
spreadsheet. Any suggestions are greatly appreciated.
Beginning 4-H Year 2008
Member's Date of Birth 9/2/2008
Too Young DOB Range 9/1/2008 8/31/2002
Clover Kid DOB Range 9/1/2002 8/31/2000
Junior DOB Range 9/1/2000 8/31/1997
Intermediate DOB Range 9/1/1997 8/31/1994
Senior DOB Range 9/1/1994 8/31/1989
Too Old DOB Range 9/1/1989 8/31/1908
Assuming your data above is in A1:C9, put the following in C2:
=INDEX(A4:A9,MATCH(B2,B4:B9,-1))
Also, you should probably put =TODAY() in B4.
|