A few date queries for a payroll calendar

mcinnes01

New Member
Joined
Jun 7, 2010
Messages
38
Hi,

I am getting on with my payroll calendar but have a few date calculation questions.

1, My last working day in the month calculation works fine, except for july which brings a #Value! error.

my formula works for all the other months:

=WORKDAY('HOLIDAY FORMULA'!J10,CHOOSE(WEEKDAY('HOLIDAY FORMULA'!J10),-1,0,0,0,0,0-1),'HOLIDAY FORMULA'!$B$3:$B$11)

j10 = eomonth calc

2. How do I find bank holiday dates for christmas where christmas day is say saturday and boxing day is sunday, therefore i would need the bank holidays as monday and tuesday.

3. Finally how do I calculate 2 working days before a date, excluding bank holidays. My bank holiday calculations will be on a seperate sheet 'HOLIDAY FORMULA'!$B$3:$B$11


Thanks,


Andy
 
During testing I found an error in my previous formula for boxing day, and neglected to include what to do if boxing day is a monday. So essentially if boxing day is ever a monday the boxing day bank holiday will be tuesday.

=IF(WEEKDAY(DATE($I$4,12,26))=7,DATE($I$4,12,26+2),IF(WEEKDAY(DATE($I$4,12,26))=1,DATE($I$4,12,26+2),IF(WEEKDAY(DATE($I$4,12,26))=2,DATE($I$4,12,26+1),DATE($I$4,12,26))))
 
Upvote 0
I believe this has already been covered in the other thread, ie for Boxing Day:

=DATE($I$4,12,26)+LOOKUP(WEEKDAY(DATE($I$4,12,26),2),{1,2,6},{1,0,2})

so to reiterate - if Boxing Day falls on Sat/Sun then associated holiday must be 28th, if it falls on Monday it must be 27th else it is the 26th.
 
Upvote 0

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