Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
can you add months to a date?
So for example you have a date. any date. like 5/20/2010 Then I want to add 6 months to the date. Then get 11/20/2010 Is there a way to do this in vba/excel? thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
greg wrote:
can you add months to a date? So for example you have a date. any date. like 5/20/2010 Then I want to add 6 months to the date. Then get 11/20/2010 Is there a way to do this in vba/excel? thanks It depends on what you mean by "month". For example, you have a date like "8/31/yyyy". Add 6 months. February...31? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
something like this might work for you' assuming you have a date value in a cell...... Sub dateadd() Dim d As Date d = Range("I3").Value d = DateSerial(Year(d), Month(d) + 6, Day(d)) MsgBox d End Sub regards FSt1 "greg" wrote: can you add months to a date? So for example you have a date. any date. like 5/20/2010 Then I want to add 6 months to the date. Then get 11/20/2010 Is there a way to do this in vba/excel? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
3 months prior and 3 months post a date | Excel Worksheet Functions | |||
About calculate months between two date (date function) | Excel Discussion (Misc queries) | |||
Todays date plus 3 months & less 3 months | Excel Programming | |||
Convert date to length of time in months from set date | Excel Worksheet Functions | |||
Return a date 6 months from a date in another cell | Excel Worksheet Functions |