date function ...

J

jer

This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am getting
is 01/30/2005.
Any suggestions
 
J

JE McGimpsey

XL stores dates as integer offsets from a base date. Assuming you're
using the 1900 date system, MONTH(3) will return the month of the 3rd
day after 31 December 1899, or 1, for January. Try:


=DATE(YEAR(A1)+1,3,30)
 
Top