However, for dates beyond and earlier than , we must look elsewhere. Formula Limitations Before moving on to the other solutions, let us look at the apparent limitations of the various worksheet function solutions.
It may very well be that these worksheet functions meet your needs and you don't need to look further. These limitations have either been stated at some point in their development, as with the contest limits mentioned earlier, or by inspection when compared to other methods of determining the date of Easter. After it disagrees with other results almost routinely. In point of fact it appears to be accurate through as with the previous formula.
But after its results are erratic also. Reputed to be accurate from , and so they are. However, they fail immediately in , then return accurate results through , and then begin to become erratic as with the previous two formulas.
So in the final analysis, the worksheet formulas cannot be used reliably to determine dates of Easter after , with two failures occurring as early as Longer Algorithms The most authoritative sources for algorithms suitable to be used as an Excel User Defined Function UDF would appear to be the work done by J.
It is Oudin's work that is now used extensively to determine the dates of Easter, even by the U. The restriction on the USNO algorithm is that it is intended to be used for years after They provide a method involving the use of tables to accurately determine its date for any year from through Additional algorithms have been attributed to Claus Tondering page 26 and page 27 and Laurent Longre , who also publishes the MoreFunc.
I cannot locate the original L. Longre code, through his current site. However, as you'll see shortly, the version presented by Daniel. M in the groups. Performance Test Results I ran tests to obtain an average time to return a single result for all the algorithms presented. The test results should be considered as relative to one another, not absolutes.
The actual time on a particular machine will vary based on CPU and system load. The tests were run on a system with an Intel i7 CPU running at 3. The number of samples for the results for each was equal to the number of valid dates the algorithm could be used for.
In other words, thousands for each one. The timing was done using the function available from http: Laurent Longre Algorithm Accuracy: This algorithm is definitely worthy of mention.
It is the shortest of all to implement, and it is the fastest running of the group by roughly a factor of 2. The average time to execute was 4. Thanks to Oscar Gunther for the following three suggestions: To handle years from to , you can remove the JLatham date check, and replace the last line with the following code: I have taken the view that this is an accurate algorithm for all years after through the Excel year limit of It is in agreement with the previously present Laurent Longre algorithm through the year and with the alternative method of determining the date of Easter presented by the ASSU which follows this code.
The average time to execute was 7. Dim d As Integer: Dim i As Integer: Dim M As Integer: The algorithm is presented to be accurate for all years from through for Western churches only. For years through it provides the same results as the USNO algorithm and since it uses a different methodology, the two act as good validations for the other.
The average time to execute was 6. Please do not modify code or comments! This implementation of Claus Tondering's work provides results for the years through that are validated by the results of the USNO algorithm for all years. The implementation even includes an adjustment for systems that use the date system instead of the date system, a nice touch.
While it is the slowest of the algorithms, its accuracy and flexibility make it a winner in my book. The average time to execute was 9. It is currently published on the Peltier Tech Blog , and was apparently originally published in the Excel Functions newsgroup.
Dim C As Integer: Dim J As Integer: The file is in Excel format, and is zipped. There are macros in the workbook, so enable the macros if you want to test the code.