Calculate the number of working days between two dates - as long as they occur within the past year

KezD

New Member
Joined
Feb 4, 2010
Messages
10
Hi

I'm trying to put together a sickness calculator that works on a rolling year basis.

I need to count the number of days between two dates, but only count the working days, which are Tuesday, Wednesday, Friday and Saturday (so exclude Mondays, Thursdays, Sundays and bank holidays) and only those dates which fall within the last year. To explain:

Let's say that today's date is 4 June 2010.

Column A holds 'Date from'.
Column B holds 'Date to'.
Column C needs to count the number of working days between the two dates (correctly excluding non-working days and bank holidays.)
Column D should count the number of working days between the Col A and Col B dates, as long as the dates are within the past year.

It's columns C and D that I need assistance with please.

Examples:-

A5 contains Mon 4 May 09
B5 contains Wed 6 May 09
C5 should calculate as 2 - because there are two working days between those dates (the Tues and the Wed).
D5 should calculate as 0 - because this range of dates is over a year ago.

A6 contains Fri 19 June 09
B6 contains Tues 23 June 09
C6 should calculate as 3 - (the Fri, Sat and Tues).
D6 should calculate as 3 - because this range of dates is within the past year.

A7 contains Tue 2 June 09
B7 contains Sat 6 June 09
C7 calculates as 4 - (the Tues, Wed, Fri and Sat).
D7 should calculate as 2 - because the 5th & 6th June 09 are working days within the past year but the 2nd & 3rd June 09 are not.

Help!!

Thanks in advance. ;)


p.s. I already have a range called 'Holidays' which lists all bank holidays.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi, I'm looking for the same thing. I am tyring to calculate the total number of days between sick leave dates as long as they occur within the past rolling 12 months (year). Can anyone help with this?
 
Upvote 0
Hi, I'm looking for the same thing. I am tyring to calculate the total number of days between sick leave dates as long as they occur within the past rolling 12 months (year). Can anyone help with this?

Welcome to the forum :)

I think you should start a new thread and post sample data and what exactly you want so people can work with that to assist you
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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