N
Norman Harker
Hi djeans!
Re the >= 29 problem..
For 31-Aug-2000 start date the next 6 monthly date will be returned as
2-Mar-2004. But after 2-Mar-2004 it will be returned as 31-Aug-2004
and after 31-Aug-2004 it will be returned as 3-Mar-2005. It's not so
much an error as a definitional difference.
Most people, (EDATE and Edit > Fill > Series) would prefer a return of
the last date of the month 6 months hence if the DoM of base month
doesn't exist. The problem gets worse if you try to copy down a series
of equally spaced time periods.
Typical way of adding months is to use:
Where AddMons is the number of months to be added:
=DATE(YEAR(A1),MONTH(A1)+AddMons,DAY(A1)
Try that with 31-Aug-2003 with different AddMons and copy each down
awhile and you'll see the problem.
One solution is:
=DATE(YEAR(A1),MONTH(A1)+AddMons,MIN(DAY($A$1),DAY(DATE(YEAR(A1),MONTH
(A1)+1+AddMons,0))))
In an earlier reply I found that I ran out of allowable formula length
using that approach. Peter Dorig's approach is more efficient:
=MIN(DATE(YEAR(A1),MONTH(A1)+ AddMons +{1,0},DAY($A$1)*{0,1}))
However, I don't think that these super long formulas are a good idea
if the use of helper columns is possible. Hence my alternative
solution earlier in this thread.
For calculation of years and months of employment use:
=DATEDIF(Start_Date,End_Date,"y")&" years
"&DATEDIF(Start_Date,End_Date,"ym")&" months"
Best way of entering dates is by cell references to cells that contain
dates.
See Chip Pearson's site for the details of the mysterious Excel
Built-In function DATEDIF (and a whole lot more):
http://www.cpearson.com/excel/datedif.htm
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Re the >= 29 problem..
For 31-Aug-2000 start date the next 6 monthly date will be returned as
2-Mar-2004. But after 2-Mar-2004 it will be returned as 31-Aug-2004
and after 31-Aug-2004 it will be returned as 3-Mar-2005. It's not so
much an error as a definitional difference.
Most people, (EDATE and Edit > Fill > Series) would prefer a return of
the last date of the month 6 months hence if the DoM of base month
doesn't exist. The problem gets worse if you try to copy down a series
of equally spaced time periods.
Typical way of adding months is to use:
Where AddMons is the number of months to be added:
=DATE(YEAR(A1),MONTH(A1)+AddMons,DAY(A1)
Try that with 31-Aug-2003 with different AddMons and copy each down
awhile and you'll see the problem.
One solution is:
=DATE(YEAR(A1),MONTH(A1)+AddMons,MIN(DAY($A$1),DAY(DATE(YEAR(A1),MONTH
(A1)+1+AddMons,0))))
In an earlier reply I found that I ran out of allowable formula length
using that approach. Peter Dorig's approach is more efficient:
=MIN(DATE(YEAR(A1),MONTH(A1)+ AddMons +{1,0},DAY($A$1)*{0,1}))
However, I don't think that these super long formulas are a good idea
if the use of helper columns is possible. Hence my alternative
solution earlier in this thread.
For calculation of years and months of employment use:
=DATEDIF(Start_Date,End_Date,"y")&" years
"&DATEDIF(Start_Date,End_Date,"ym")&" months"
Best way of entering dates is by cell references to cells that contain
dates.
See Chip Pearson's site for the details of the mysterious Excel
Built-In function DATEDIF (and a whole lot more):
http://www.cpearson.com/excel/datedif.htm
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.