Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation | Excel Discussion (Misc queries) | |||
Loading Column Data with blank Rows into Data Validation Box | Excel Worksheet Functions | |||
Case Sensitivity problem with data validation | Excel Worksheet Functions | |||
data validation lists | Excel Discussion (Misc queries) | |||
named range, data validation: list non-selected items, and new added items | Excel Discussion (Misc queries) |