Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Dynamic Date Drop-down List

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Date Drop-down List

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Dynamic Date Drop-down List

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Date Drop-down List

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
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
can I create a drop down list to pick a date ? Retired Bill Excel Worksheet Functions 3 March 23rd 09 05:46 PM
Date Drop-down list azlan Setting up and Configuration of Excel 2 July 4th 07 05:51 AM
How to feed dynamic information to a drop down List (Validation Feature)? kscramm Excel Worksheet Functions 1 March 28th 06 12:14 PM
Dynamic Drop Down List I''m Still Here Excel Discussion (Misc queries) 5 March 22nd 06 08:46 PM
Can I put a calendar in a drop down list to select a date? goldsie2003 Excel Discussion (Misc queries) 1 January 23rd 06 11:49 AM


All times are GMT +1. The time now is 07:14 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"