Calculating Holidays

jwbanks10

New Member
Joined
Mar 1, 2014
Messages
30
I am needing to calculate holidays that I can use as part of the workday function. I used the following formula for Thanksgiving but need help understanding what it is doing so I can calculate these other holidays.

=DATE(C2,11,1)+21+CHOOSE(WEEKDAY(DATE(C2,11,1)),4,3,2,1,0,6,5) --C2 is the year

Holidays Needed

President's Day (third monday in Feb)
Memorial Day (last Monday in May)
Labor Day (first Monday in Sept)
Thanksgiving (Fourth Thursday in Nov)
Day after Thanksgiving
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I am needing to calculate holidays that I can use as part of the workday function. I used the following formula for Thanksgiving but need help understanding what it is doing so I can calculate these other holidays.

=DATE(C2,11,1)+21+CHOOSE(WEEKDAY(DATE(C2,11,1)),4,3,2,1,0,6,5) --C2 is the year

Holidays Needed

President's Day (third monday in Feb)
Memorial Day (last Monday in May)
Labor Day (first Monday in Sept)
Thanksgiving (Fourth Thursday in Nov)
Day after Thanksgiving
Here is a simpler generalize formula that will work directly for all but Memorial Day (last Monday can be either the 4th or 5th Monday of the month, so you need to tweak the formula slightly for it)...

=DATE(Yr,MM,1+7*Nth)-WEEKDAY(DATE(Yr,MM,8-DoW))

where Nth is the number you want 1st, 2nd, 3rd etc. of the month and where DoW stands for day of the week with Sunday being 1, Monday being 2, etc. Yr is the year and MM is the month number.

To get the last Monday in May, calculate the first Monday in June and subtract 7 from it.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top