Attendance Calendar - Holidays that fall on Weekends, show nearest weekday

merno

New Member
Joined
Jan 4, 2016
Messages
2
Hello,
I have an attendance calendar that automatically tells the date of holidays based on the year in cell: G2. I need the holidays that fall on Saturday to show the date as the Friday before, and holidays that fall on Sunday to show the Monday after.

Here is the equation I have for Christmas Day 2016:

=DATE(G2,12,31)

In this sheet, G2 cell: 2016

For Christmas Day 2016 it falls on a Sunday, so I want it to give me the date: December 26, 2016

What do I need to add the equation to show this?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe:

=DATE(G2,12,25)+CHOOSE(WEEKDAY(DATE(G2,12,25)),1,0,0,0,0,0,-1)

This will add a day if Christmas falls on a Sunday, and subtracts a day if it falls on Saturday.
 
Upvote 0
what happens to boxing day on a saturday
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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