holiday on mondays

bam12

Well-known Member
Joined
Dec 6, 2004
Messages
983
i need to find closest workday to certain holidays.

like new years day

i have =date(z13,1,1) z13 is 2007
i need to find closest workday to this holiday if it falls on a weekend
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

bam12

Well-known Member
Joined
Dec 6, 2004
Messages
983
others

also 4th of july, christmas, will needto be found closest workday
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Can you explain exactly what you mean?

1st January 2007 is a Monday, do you want to return that day (as it isn't a weekend) or the next weekday, i.e. Tuesday 2nd January?

You say closest, do you actaully mean closest (before or after) or the next one after?
 

bam12

Well-known Member
Joined
Dec 6, 2004
Messages
983
sorry

sorry i didn't explain it correctly

what i am looking for is when a holiday lands on weekend to be the closest workday to it

so if jan 1 was a sunday or saturday it would show monday date (looking to make table of when holidays would be celebrated during work week

another example if christmas is saturday, have friday off
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
This would give you the date itself, if a weekday, the previous Friday, if a Saturday or the following Monday, if a Sunday

=WORKDAY(DATE(Z13,1,1)-1-(WEEKDAY(DATE(Z13,1,1),2)>5),1)
 

Forum statistics

Threads
1,136,878
Messages
5,678,302
Members
419,753
Latest member
Sallylwy

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
Top