User-Defined Functions

Excel VBA
Excel Formulas
User-defined Functions
Office Links
Access VBA
Access SQL
Alan’s Excel FAQ
Excel Home
Alan’s Home

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-2009

Updated:  06/04/2009 22:32
This page added:  21 July 2001