Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Are there any Easter Eggs for Excel 2003? | Excel Discussion (Misc queries) | |||
Obtain Easter date? | Excel Worksheet Functions | |||
Easter Eggs in 2003 | Excel Discussion (Misc queries) | |||
Easter Eggs? | New Users to Excel | |||
Excel template for the date of Easter | Excel Discussion (Misc queries) |