ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   filling a column with consecutive months (https://www.excelbanter.com/excel-programming/377806-filling-column-consecutive-months.html)

John Smith

filling a column with consecutive months
 
I would like to have users enter a mm/yy in one cell and the
following 359 cells in the same column will be automatically
filled with the subsequent months. What is the formula to be used?
Thanks.

marcus[_3_]

filling a column with consecutive months
 
Hi John

Do you know exactly what cell the person will be entering data? If for
example they are entering dates in Cell A2, then this vba coding will
work. If not I am sure you can adjust to suit.

Sub Filldown()

Application.ScreenUpdating = False
Range("A2").AutoFill Destination:=Range("A2:A360")

End Sub


Take care

Marcus

John Smith wrote:
I would like to have users enter a mm/yy in one cell and the
following 359 cells in the same column will be automatically
filled with the subsequent months. What is the formula to be used?
Thanks.



John Smith

filling a column with consecutive months
 
Sorry, forgot to mention that I'd like to also increase the month.
Is there an easy way to do that? I tried to use the formula
"=R[-1]C + 30". That did not work.

marcus wrote:
Hi John

Do you know exactly what cell the person will be entering data? If for
example they are entering dates in Cell A2, then this vba coding will
work. If not I am sure you can adjust to suit.

Sub Filldown()

Application.ScreenUpdating = False
Range("A2").AutoFill Destination:=Range("A2:A360")

End Sub


Take care

Marcus

John Smith wrote:

I would like to have users enter a mm/yy in one cell and the
following 359 cells in the same column will be automatically
filled with the subsequent months. What is the formula to be used?
Thanks.





All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com