View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Date fomula not working

I'm pretty sure this simpler (than the original) non-ATP formula will also
work...

=A2-365-(DAY(A2)<DAY(A2-365))

--
Rick (MVP - Excel)


"Shane Devenshire" wrote in
message ...
Hi,

The function is calculating the date one year prior with and adjustment
for
leap years. It works as written.

However you might consider using the following which does exactly the same
thing:

=EDATE(A2,-12)

In Excel 2003 or earlier you will need to attach the ATP - Tools, Add-Ins,
and check Analysis ToolPak. In 2007 nothing to do.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"FangYR" wrote:

I have use this last year, it's fine until now. the formula is now new to
Ron,
=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))-(MONTH(DATE(YEAR(A2)-1,MONTH(A2),DAY(A2)))<MONTH(A2))
That is, I enter a month and day in A2 and it will appear as last year's
date, but now nothing changes, still in default year 2009.
Please advise.
--
Regards
FangYR
Malaysia