Hi Norman
You are right. Apologies to the OP and thanks for the detailed explanation.
--
XL2002
Regards
William
(e-mail address removed)
| Hi William!
|
| Although using YEARFRAC with the third argument of 1 should work,
| you'll find that you get problems with using YEARFRAC and that it
| produces errors where the dates are more than one year apart.
|
| This function was intended for calculating time spans of less than one
| year (note the name), and is more specifically intended for things
| like financial calculations of accrued interest,etc where different
| day count bases may be used. Without the 3rd argument, you are
| assuming 30 day months and 360 days per year. Even setting 3rd
| argument to 1, you'll get errors when the 2nd date is very close to
| the anniversary of the birthdate. And you get different results for
| different years. In some instances on the exact anniversary you'll
| find non-integer results
|
| Stick to DATEDIF for this purpose. If you need the non-integer
| fractions of a year, I'm afraid it back to more complicated formulas:
|
| =DATEDIF(A1,B1,"y")+(B1-DATE(YEAR(A1)+DATEDIF(A1,B1,"y"),MONTH(A1),DAY
| (A1)))/(DATE(YEAR(A1)+DATEDIF(A1,B1,"y")+1,MONTH(A1),DAY(A1))-DATE(YEA
| R(A1)+DATEDIF(A1,B1,"y"),MONTH(A1),DAY(A1)))
|
|
| Nasty? Yes! But it's accurate according to most people's understanding
| / definition of how to calculate a fraction of a year. There's a
| fuller outline of the problem at:
|
|
http://tinyurl.com/2nstc
|
| --
| 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.
| | > Hi Grandmother
| >
| > =INT(YEARFRAC($G$2,H2))
| > (You need to have the Analysis ToolPak addin loaded.)
| > --
| > XL2002
| > Regards
| >
| > William
| >
| > (e-mail address removed)
| >
| message
| > | > | I need help with the following. I cannot get the correct formula.
| I am
| > | using Excel 2002.
| > |
| > | Calculate the Years of doing business with each person by
| subtracting
| > | thre Start Date (12/23/89) which is in G2, from 8/14/2003. Use
| 365.25
| > | for the number of days in a year. Use an integer to represent the
| > | number of complete years. Do not include partial years, and do
| not
| > | round up. Any decimal positions are truncated.
| > |
| > |
| > | ---
| > | Message posted
| > |
| >
| >
| >
|
|