View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Easter date macro

It's a user defined function, you need to "install " it


http://www.mvps.org/dmcritchie/excel/install.htm




Or you can use built in functions


=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6

won't work if you are using 1904 date system (default in Mac)


=DATE(A1,3,29.56+0.979*MOD(204-11*MOD(A1,19),30)-
WEEKDAY(DATE(A1,3,28.56+0.979*MOD(204-11*MOD(A1,19),30))))


will work under all date systems


for both formulas put the year in A1 and you will get the Easter date



--


Regards,


Peo Sjoblom



"GerryK" wrote in message
...
Hi,
Could someone please let me know why the following macro stopped working?
IT
did replace my computer!

This macro used to work:

Public Function EasterDate(Yr As Integer) As Date

Dim d As Integer
d = (((255 - 11 * (Yr Mod 19)) - 21) Mod 30) + 21
EasterDate = DateSerial(Yr, 3, 1) + d + (d 48) + 6 - ((Yr + Yr \ 4 + _
d + (d 48) + 1) Mod 7)

End Function