Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
I am attempting to automatically fill a row with dates. In Cell A5, I enter the first day of the month eg 1 April 2010. I then want the adjacent columns to automatically fill with the subsequent dates eg cell B5 is 2 April 2010, cell C5 is 3 April 2010 etc, It must only fill upto and including the last day of the month and not roll into May. These cells then allow my Vlookup function and graph to operate solely for that particular month. Obviously just adding +1 to the previous cell will do this, but then I may end up with dates in the next month which is what I need to avoid. Preferably the function would only work when the date in A5 is changed so I would like to avoid using a button. Regards Ant |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way...
A5 = the first of the month date like 4/1/2010 Enter this formula in B5 and copy across to AE5: =IF($A5="","",IF(COLUMNS($A5:B5)DAY(EOMONTH($A5,0 )),"",A5+1)) Note that the EOMONTH 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 EOMONTH function. It'll tell you how to fix the problem. -- Biff Microsoft Excel MVP "Ant" wrote in message ... Hello, I am attempting to automatically fill a row with dates. In Cell A5, I enter the first day of the month eg 1 April 2010. I then want the adjacent columns to automatically fill with the subsequent dates eg cell B5 is 2 April 2010, cell C5 is 3 April 2010 etc, It must only fill upto and including the last day of the month and not roll into May. These cells then allow my Vlookup function and graph to operate solely for that particular month. Obviously just adding +1 to the previous cell will do this, but then I may end up with dates in the next month which is what I need to avoid. Preferably the function would only work when the date in A5 is changed so I would like to avoid using a button. Regards Ant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populating dates into a 2003 Excel worksheet | Excel Discussion (Misc queries) | |||
formulas populating dates - 1st Tuesday | Excel Worksheet Functions | |||
Populating a column with calender dates............ | Excel Worksheet Functions | |||
populating a list box with weekly dates | Excel Worksheet Functions | |||
Populating another tab. | Excel Discussion (Misc queries) |