Count Between dates using NETWORKDAYS

Steven1985

Board Regular
Joined
Mar 2, 2011
Messages
66
Hi,

I have an exisiting formula to count number of days and hours between 2 date ranges-

=IF(AP3="","",AP3-A3)

but i need the dates only for working days. i have made a list of non working days on a 'CONTROL' tab Column A10-A47.

aNY IDEA HOW i CAN INCLUDE THIS?

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
This should work. You don't have to list weekends within your non-working days, just days such as bank holidays or holidays, etc.

=NETWORKDAYS(A3,AP3,A10:A47)
 
Upvote 0
This is the formula im using below but comes back with 'FALSE'

=IF(AO3="","",AO3-A3)=NETWORKDAYS(A3,AO3,Controls!$A$10:$A$47)

Just using the )=NETWORKDAYS(A3,AO3,Controls!$A$10:$A$47) doent give the information I need as I need to count the data and time from column A and include a date and time in column A0 for then column AP (where the formulas held to count d hh:mm).
 
Upvote 0
NETWORKDAYS only returns the number of days:

=IF(AP3="","",NETWORKDAYS(A3,AP3,CONTROL!$A$10:$A$47))

Since you want to get the hours as well, you need to work those out using some other formula.

The easiest way might be using the NETWORKDAYS formula for the whole days only (= A3+1,AP3-1) and multiply that with the number or hours per day + calculate the first & last days as hours only: First day = hours from starting point till midnight & last day = from midnight to the ending point. If you're only calculating working hours adjust the starting & ending hours from midnight to the correct time.
 
Upvote 0
you could revert to your original formula that gave you the days and time, and subtract 24 hours for any day in your list of non working days, using countif.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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