Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Easter date macro

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there any Easter Eggs for Excel 2003? Jennifer Excel Discussion (Misc queries) 2 August 29th 06 07:09 PM
Obtain Easter date? Gabbon Excel Worksheet Functions 3 April 6th 06 02:04 PM
Easter Eggs in 2003 Rock Excel Discussion (Misc queries) 2 August 24th 05 01:16 PM
Easter Eggs? Rodney New Users to Excel 1 May 10th 05 11:45 AM
Excel template for the date of Easter Dadgum Excel Discussion (Misc queries) 3 December 28th 04 11:04 AM


All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"