View Single Post
  #4   Report Post  
KathyC
 
Posts: n/a
Default YEAR and MONTH confusion


Hi Mac

Oops! I should have taken that first paren out on the first statement.
It actually wasn't there on the last try. The 2nd statement is how I
had it:

=YEAR(R[-1]C)-YEAR(TODAY())*12+MONTH(R[-1]C)-MONTH(TODAY())

But it does make sense to have an extra set of parens to be sure that
the 12 multiplies against the subtraction result, so:

=(YEAR(R[-1]C)-YEAR(TODAY()))*12+MONTH(R[-1]C)-MONTH(TODAY())

Unfortunately that gives me a result of 0.00 when using the buy date
4/1/2002 and today=11/4/05.

I also threw extra parens around the last half, with the same 0.00
result:

=(YEAR(R[-1]C)-YEAR(TODAY()))*12+(MONTH(R[-1]C)-MONTH(TODAY()))


Any other suggestions?

Thanks, Kathy


--
KathyC
------------------------------------------------------------------------
KathyC's Profile: http://www.excelforum.com/member.php...o&userid=25124
View this thread: http://www.excelforum.com/showthread...hreadid=482400