Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm trying to create a Validation List that shows a drop-down with three
years worth of dates before and after today's date. Currently I am using a 2100 row list of manually inputted dates in a separate worksheet but that just gets cumbersome when I have to constantly update the date range named "Calendar Dates" Does anyone know if there is there some sort of Function or code that can do this dynamically without using 2100 rows? I'm thinking that sheet3 cell A3 has today's date, A2 has a calculated back-off date that goes backwards to 365*3 and then the same for A4 but it goes forwards. Just Hoping. Thanks In Advance, Rob |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe this...
A2: =EDATE(NOW(),-36) A3: =EDATE(NOW(),36) As the source for the drop down: =INDEX(range,MATCH(A2,range,0)):INDEX(range,MATCH( A3,range,0)) Note that the EDATE function requires the Analysis ToolPak add-in be installed if you're using a version of Excel prior to Excel 2007. If you enter the formula and get a #NAME? error look in Excel help for the EDATE function. It'll tell you how to fix the problem. -- Biff Microsoft Excel MVP "Rob" wrote in message ... I'm trying to create a Validation List that shows a drop-down with three years worth of dates before and after today's date. Currently I am using a 2100 row list of manually inputted dates in a separate worksheet but that just gets cumbersome when I have to constantly update the date range named "Calendar Dates" Does anyone know if there is there some sort of Function or code that can do this dynamically without using 2100 rows? I'm thinking that sheet3 cell A3 has today's date, A2 has a calculated back-off date that goes backwards to 365*3 and then the same for A4 but it goes forwards. Just Hoping. Thanks In Advance, Rob |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wow, I just learned something new with the EDATE() Function!! Thanks!
Unfortunately the source for the drop down does not seem to work. I think it's because of the term "range" in it. What am I needing to provide for that one? "T. Valko" wrote: Maybe this... A2: =EDATE(NOW(),-36) A3: =EDATE(NOW(),36) As the source for the drop down: =INDEX(range,MATCH(A2,range,0)):INDEX(range,MATCH( A3,range,0)) Note that the EDATE function requires the Analysis ToolPak add-in be installed if you're using a version of Excel prior to Excel 2007. If you enter the formula and get a #NAME? error look in Excel help for the EDATE function. It'll tell you how to fix the problem. -- Biff Microsoft Excel MVP "Rob" wrote in message ... I'm trying to create a Validation List that shows a drop-down with three years worth of dates before and after today's date. Currently I am using a 2100 row list of manually inputted dates in a separate worksheet but that just gets cumbersome when I have to constantly update the date range named "Calendar Dates" Does anyone know if there is there some sort of Function or code that can do this dynamically without using 2100 rows? I'm thinking that sheet3 cell A3 has today's date, A2 has a calculated back-off date that goes backwards to 365*3 and then the same for A4 but it goes forwards. Just Hoping. Thanks In Advance, Rob |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
range = the range of cells where your dates are located.
Let's assume the dates are in the range B1:B2000. Then: =INDEX(B1:B2000,MATCH(A2,B1:B2000,0)):INDEX(B1:B20 00,MATCH(A3,B1:B2000,0)) If the dates are located on a different sheet than where the drop down is located you'll have to give the formula defined name and then use that defined name as the source for the drop down. -- Biff Microsoft Excel MVP "Rob" wrote in message ... Wow, I just learned something new with the EDATE() Function!! Thanks! Unfortunately the source for the drop down does not seem to work. I think it's because of the term "range" in it. What am I needing to provide for that one? "T. Valko" wrote: Maybe this... A2: =EDATE(NOW(),-36) A3: =EDATE(NOW(),36) As the source for the drop down: =INDEX(range,MATCH(A2,range,0)):INDEX(range,MATCH( A3,range,0)) Note that the EDATE function requires the Analysis ToolPak add-in be installed if you're using a version of Excel prior to Excel 2007. If you enter the formula and get a #NAME? error look in Excel help for the EDATE function. It'll tell you how to fix the problem. -- Biff Microsoft Excel MVP "Rob" wrote in message ... I'm trying to create a Validation List that shows a drop-down with three years worth of dates before and after today's date. Currently I am using a 2100 row list of manually inputted dates in a separate worksheet but that just gets cumbersome when I have to constantly update the date range named "Calendar Dates" Does anyone know if there is there some sort of Function or code that can do this dynamically without using 2100 rows? I'm thinking that sheet3 cell A3 has today's date, A2 has a calculated back-off date that goes backwards to 365*3 and then the same for A4 but it goes forwards. Just Hoping. Thanks In Advance, Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I create a drop down list to pick a date ? | Excel Worksheet Functions | |||
Date Drop-down list | Setting up and Configuration of Excel | |||
How to feed dynamic information to a drop down List (Validation Feature)? | Excel Worksheet Functions | |||
Dynamic Drop Down List | Excel Discussion (Misc queries) | |||
Can I put a calendar in a drop down list to select a date? | Excel Discussion (Misc queries) |