Calculate # of days/hours minus weekends

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
202
Office Version
  1. 365
Platform
  1. Windows
not sure how to word this exactly but basically i am trying to calculate the difference between 2 dates/times and exclude the weekends. =networkdays and =workdays isnt yielding the precision i am looking for. they only seem to be counting the whole days and not taking into account the hours.

Collection Date/TimeOrder Entry Date/TimeCalander daysCalander hoursnetowork daysWhat it should be
09/28/2022 07:00:0010/3/22 12:22 AM4.72
=(J2-I2)
113.37
=(J2-I2)*24
4.00
=networkdays(I2,J2)
2.72
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
T202211a.xlsm
DEFGHI
3Collection Date/TimeOrder Entry Date/TimeCalander daysCalander hoursWhat it should be
4Wed 28-Sep-22 07:00 AMMon 3-Oct-22 12:22 AM2.72
5
8d
Cell Formulas
RangeFormula
I4I4=E4-D4-(NETWORKDAYS(D4,E4)-2)
 
Last edited:
Upvote 0
N.B. The start date and the end date are not 24 hours.

It may be easier to just deduct the number of weekend days.

T202211a.xlsm
DEFGHI
2
3Collection Date/TimeOrder Entry Date/TimeCalendar daysCalendar hoursWhat it should be
4Wed 28-Sep-22 07:00 AMMon 3-Oct-22 12:22 AMdeduct the weekend days2.72
5
8d
Cell Formulas
RangeFormula
I4I4=E4-D4-NETWORKDAYS.INTL(D4,E4,"1111100")
 
Upvote 0
N.B. The start date and the end date are not 24 hours.

It may be easier to just deduct the number of weekend days.

T202211a.xlsm
DEFGHI
2
3Collection Date/TimeOrder Entry Date/TimeCalendar daysCalendar hoursWhat it should be
4Wed 28-Sep-22 07:00 AMMon 3-Oct-22 12:22 AMdeduct the weekend days2.72
5
8d
Cell Formulas
RangeFormula
I4I4=E4-D4-NETWORKDAYS.INTL(D4,E4,"1111100")
The first formula provided what i needed. i was able to apply it and they compared perfectly to what i was expecting it to.
 
Upvote 0
You may want to review the formulas.
Try Formulas Evaluate Formula

T202211a.xlsm
DEFGHI
3Collection Date/TimeOrder Entry Date/TimeCalendar daysCalendar hours
4Mon 26-Sep-22 07:00 AMFri 30-Sep-22 12:22 AM3.72
5Mon 26-Sep-22 07:00 AMFri 30-Sep-22 12:22 AM0.72
8d
Cell Formulas
RangeFormula
I4I4=E4-D4-NETWORKDAYS.INTL(D4,E4,"1111100")
I5I5=E5-D5-(NETWORKDAYS(D5,E5)-2)
 
Upvote 0
Solution
You may want to review the formulas.
Try Formulas Evaluate Formula

T202211a.xlsm
DEFGHI
3Collection Date/TimeOrder Entry Date/TimeCalendar daysCalendar hours
4Mon 26-Sep-22 07:00 AMFri 30-Sep-22 12:22 AM3.72
5Mon 26-Sep-22 07:00 AMFri 30-Sep-22 12:22 AM0.72
8d
Cell Formulas
RangeFormula
I4I4=E4-D4-NETWORKDAYS.INTL(D4,E4,"1111100")
I5I5=E5-D5-(NETWORKDAYS(D5,E5)-2)

Ahh, i see. on the surface it looks ok but when i dug a little deeper i see what you mean. Good catch!
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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