Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003
With a worksheet function, you can add x years, y months, and z days to a date using a formula like: =DATE(YEAR(A1)+2, MONTH(A1)+3, DAY(A1)+4) [from Chip Pearson's site] What is the analogous way of doing this in VBA? DATE is apparently not a worksheet function available in VBA (Application.WorksheetFunction). The DateAdd function in VBA lets you add only one interval (years or months or days) at a time, and the Help file examples don't go beyond this. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting days to years & months & days | Excel Discussion (Misc queries) | |||
how do i convert a number of days to years, months & days? | Excel Discussion (Misc queries) | |||
HOW DO I CALCULATE THE YEARS MONTHS AND DAYS BETWEEN SEVERAL DATE | Excel Discussion (Misc queries) | |||
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE | Excel Discussion (Misc queries) | |||
Start Date minus (Years + Months + Days) = ? | Excel Programming |