User-Defined Functions

css navigation by Css3Menu.com

Easter Function

Can't remember where I got it, but here is the Function for figuring Easter. To get Good Friday for my list since it is a company holiday, I use =EasterDate(theYear)-2


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


© 2001-2024

Updated:  06/21/2024 07:42
This page added:  21 July 2001