How to calculate completion date/time ignoring nonworking hours

sosession

New Member
Joined
Jun 16, 2015
Messages
6
Known Variables
  • A1 = start date and time (6/16/15 6:00AM)
  • B1 = estimated hours to complete work order (15)
  • Work schedule is 6AM to 6PM, weekdays only

What formula can I use to calculate the end date/time, ignoring nonworking hours? It currently says that the estimated completion will be 6/16/15 9:00PM. However, that is outside of working hours. The correct estimated completion date/time should be 6/17/15 9:00AM. How do I ignore nonworking hours and weekends? Please help!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi,

If B1 holds 6:00 AM and B2 holds 6:00 PM ... you could test :

=WORKDAY(A1,CEILING((A2+MOD(A1,1)-B1)/(B2-B1),1)-1)+MOD(A1,1)+A2-CEILING(MOD(A1,1)+A2-B1,B2-B1)+B2-B1
 
Upvote 0
Hi,

If B1 holds 6:00 AM and B2 holds 6:00 PM ... you could test :

=WORKDAY(A1,CEILING((A2+MOD(A1,1)-B1)/(B2-B1),1)-1)+MOD(A1,1)+A2-CEILING(MOD(A1,1)+A2-B1,B2-B1)+B2-B1


I'm not following. Please elaborate on how this helps. Thanks!
 
Upvote 0
Hi,

Before elaborating ... have you tried to apply the formula ...???
 
Upvote 0
Fair enough ... But is your result right or wrong ...???
 
Upvote 0
Well I'm lost because I had the start day and time in a1, wo hours in b1. You changed b1 and b2 so I don't even have a number of work order hours I'm trying to compute now.
 
Upvote 0
Sorry for the confusion ... when building the formula for you ... I used :


  • A1 = start date and time
  • A2 = estimated hours to complete work order
  • B1 = 6AM
  • B2 = 6PM
 
Upvote 0
Thank you for clarifying. Unfortunately, the cell comes back with an error (I used 14 for my work order hours).
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,656
Members
449,091
Latest member
peppernaut

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