This example teaches you how to get the date of a holiday for any year. If you are in a hurry, simply download the Excel file.
Before you start: the CHOOSE function returns a value from a list of values, based on a position number. For example, =CHOOSE(3,"Car","Train","Boat","Plane") returns Boat. The WEEKDAY function returns a number from 1 (Sunday) to 7 (Saturday) representing the day of the week of a date.
1. This is what the spreadsheet looks like. If you enter a year into cell C2, Excel returns all the holidays for that year. Of course, New Year's Day, Independence Day, Veteran's Day and Christmas Day are easy.
2. All other holidays can be described in a similar way: the xth day in a month (except Memorial day which is slightly different). Let's take a look at Thanksgiving Day 2016. If you understand Thanksgiving Day, you understand all holidays. Thanksgiving is celebrated the 4th Thursday in November.
The calendar below helps you understand Thanksgiving Day 2016.
Explanation: DATE(C2,11,1) reduces to 11/1/2016. WEEKDAY(DATE(C2,11,1)) reduces to 3 (Tuesday). Now the formula reduces to 11/1/2016 + 21 + CHOOSE(3,4,3,2,1,0,6,5) = 11/1/2016 + 21 + 2 = 11/24/2016. We needed the 2 extra days because it takes 2 days until the first Thursday in November. From there, it takes another 21 days (3 weeks) until the 4rd Thursday in November. It doesn't matter on which day November 1 falls, the CHOOSE function correctly adds the number of days until the first Thursday in November (notice the pattern in the list of values). From there, it always takes another 21 days until the 4rd Thursday in November. Therefore, this formula works for every year.
3. Let's take a look at Martin Luther King Jr. Day.
Explanation: this formula is almost the same. The first DATE function reduces to the first of January this time. The base position (0) in the list of values for the CHOOSE function is located at the second spot now (we are looking for a Monday). If the 1st of January falls on a Monday, it takes 14 + CHOOSE(2,1,0,6,5,4,3,2) = 14 + 0 = 14 days (2 weeks) until the 3rd Monday in January.