LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Adding months to a Date in VBA

The corresponding VBA function is DateSerial. But there are also specialized
functions like DateAdd, DatePart, etc. Check VBA help for date functions.

On Wed, 17 Nov 2004 15:29:06 -0800, kdw wrote:

I need to add months to a date. For example, 4/2/04 + 6 months to give
10/2/04.

I have seen examples of how to add months such as:

=MIN(DATE(YEAR(A1),MONTH(A1)+48,DAY(A1));DATE(YEA R(A1),MONTH(A1)+1+48,0))

But Date() means something different in VBA than in Excel. Is there another
solution?

Thanks.




 
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
Adding months to date at end of month Shaggyjh Excel Discussion (Misc queries) 4 November 28th 07 12:30 PM
Adding .45 months to a date Trev[_2_] Excel Worksheet Functions 4 April 25th 07 05:31 PM
Adding months to a date miss misty Excel Worksheet Functions 3 April 13th 07 01:59 AM
Adding 6 Months to a Date Excel User Excel Worksheet Functions 8 January 25th 07 12:16 AM
Adding 6 months to any given date hoyt New Users to Excel 7 July 9th 06 11:14 AM


All times are GMT +1. The time now is 03:05 PM.

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

About Us

"It's about Microsoft Excel"