Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Casey
 
Posts: n/a
Default Data Validation for end of Month


Hi Everybody,
I need a drop down list based on the current date that would display
the previous 4 end of month dates, the current end of month date and 3
future end of month dates. And I'm hoping it would change based on the
actual current date.

As an example using today 2/8/06 the drop down would display the
following:

October 31, 2005
November 30, 2005
December 31, 2005
January 31, 2006
February 28, 2006
March 31, 2006
April 30, 2006
May 31, 2006

This could be a data validation formula or a VBA solution of some kind.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149

  #2   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default Data Validation for end of Month

Put these formulas somewhere in your worksheet, and refer to this list in the
validation menu. If you have the list on another worksheet, you will need to
define the list name and refer to that name with an "=" in the source box.

=DATE(YEAR(TODAY()),MONTH(TODAY())-3,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())-2,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())-1,0)
=DATE(YEAR(TODAY()),MONTH(TODAY()),0)
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())+2,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())+3,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())+4,0)

"Casey" wrote:


Hi Everybody,
I need a drop down list based on the current date that would display
the previous 4 end of month dates, the current end of month date and 3
future end of month dates. And I'm hoping it would change based on the
actual current date.

As an example using today 2/8/06 the drop down would display the
following:

October 31, 2005
November 30, 2005
December 31, 2005
January 31, 2006
February 28, 2006
March 31, 2006
April 30, 2006
May 31, 2006

This could be a data validation formula or a VBA solution of some kind.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149


  #3   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Data Validation for end of Month

You can always get the last day of a month by calling it the
zeroth day of the next month. So set up a range with

=DATE(YEAR(TODAY()),MONTH(TODAY())-3,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())-2,0)
etc up to
=DATE(YEAR(TODAY()),MONTH(TODAY())+4,0)

formatted as "mmmm d, yyyy"
and use that as the source (*ListFillRange") of your dropdown



Casey wrote:
Hi Everybody,
I need a drop down list based on the current date that would display
the previous 4 end of month dates, the current end of month date and 3
future end of month dates. And I'm hoping it would change based on the
actual current date.

As an example using today 2/8/06 the drop down would display the
following:

October 31, 2005
November 30, 2005
December 31, 2005
January 31, 2006
February 28, 2006
March 31, 2006
April 30, 2006
May 31, 2006

This could be a data validation formula or a VBA solution of some kind.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149


  #4   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Data Validation for end of Month

You can always get the last day of a month by calling it the
zeroth day of the next month. So set up a range with

=DATE(YEAR(TODAY()),MONTH(TODAY())-3,0)
=DATE(YEAR(TODAY()),MONTH(TODAY())-2,0)
etc up to
=DATE(YEAR(TODAY()),MONTH(TODAY())+4,0)

formatted as "mmmm d, yyyy"
and use that as the source (*ListFillRange") of your dropdown



Casey wrote:
Hi Everybody,
I need a drop down list based on the current date that would display
the previous 4 end of month dates, the current end of month date and 3
future end of month dates. And I'm hoping it would change based on the
actual current date.

As an example using today 2/8/06 the drop down would display the
following:

October 31, 2005
November 30, 2005
December 31, 2005
January 31, 2006
February 28, 2006
March 31, 2006
April 30, 2006
May 31, 2006

This could be a data validation formula or a VBA solution of some kind.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149


  #5   Report Post  
Posted to microsoft.public.excel.misc
Casey
 
Posts: n/a
Default Data Validation for end of Month


Andrew & Sloth,
Thank you for your replies. I'm pretty good with most functions and
features of Excel. But working with dates is my biggest weak point.
Your solution works well. Thanks for the time, experience and brain
power.

Regards,


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149



  #6   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Data Validation for end of Month

You're welcome :)

Excel's date & time functionality can be very useful and
powerful, and is well worth getting familiar with. Have a
look at Chip Pearson's page at:
http://www.cpearson.com/excel/datetime.htm (and links from there)
for some good explanations and examples.

Andrew

Casey wrote:
Andrew & Sloth,
Thank you for your replies. I'm pretty good with most functions and
features of Excel. But working with dates is my biggest weak point.
Your solution works well. Thanks for the time, experience and brain
power.

Regards,


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=510149


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
Data Validation Neville Excel Discussion (Misc queries) 1 October 30th 05 08:15 AM
Loading Column Data with blank Rows into Data Validation Box ExcelMonkey Excel Worksheet Functions 3 October 13th 05 06:09 PM
Case Sensitivity problem with data validation Upya Excel Worksheet Functions 3 October 7th 05 01:30 AM
data validation lists [email protected] Excel Discussion (Misc queries) 5 June 25th 05 07:44 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM


All times are GMT +1. The time now is 07:43 AM.

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

About Us

"It's about Microsoft Excel"