Adding and subtracting time and date within a specified date range

laurak

New Member
Joined
Nov 7, 2016
Messages
7
Hi,

I need to create a dynamic table that helps with backplanning from a specified date and time. It's meant to be used for project management, so I essentially something like this:

Table.png


If someone enters data into the blue boxes the full table should populate with dates and times in the format h:mm AM/PM dd/mm/yyyy (see to the right of 'END' for an example).

The only additional complication is that I need to exclude holidays and non-working hours from the times that are returned in the table.

I think the formula would look something like this:

Using a date and time range that excludes group A (specified holiday date range) and B (specified non-working hour time range), calculate X (time and date specified in blue boxes) - Y (time and date duration listed on the left hand column of the table).

I've tried WORKDAY, NETWORKDAYS, and varioius time and date combinations but the biggest issue is nothing allows for combinated date and time addition and subtraction while also excluding specified date and time ranges.

Any ideas?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
use eg 15:45 and one cell with date in it then these can be added(not concatenated) to give say 9/3/16 15:45

maybe use a pre built look up table to deal with non working hours and days

so if that minus 8 hours is 07:45 and you don't start work till 08:30 the lookup would move to say 3:30 the previous day....
 
Upvote 0
Thanks! Do you have any reference for how I can prebuild a lookup table, or what formula the formula needs to look like?
 
Upvote 0
assume work ends 5 pm17:00:00
and starts 9 am09:00:00
00:00:0016:00:00
07:00:0000:15:0016:15:00
00:30:0016:30:00
00:45:0016:45:00
01:00:0017:00:00
01:15:0017:15:00
this will take time to sort the logic01:30:0017:30:00
01:45:0017:45:00
but if a job will finish at say 01:30:0002:00:0018:00:00
02:15:0018:15:00
you look up that time in the table02:30:0018:30:00
and get 17:30:0002:45:0018:45:00
03:00:0019:00:00
alas that is beyond finishing time03:15:0019:15:00
so you need to add 30 minutes03:30:0019:30:00
to tomorrows 09:00:0003:45:0019:45:00
04:00:0020:00:00
04:15:0020:15:00
are you familiar with look up tables ?04:30:0020:30:00
04:45:0020:45:00
05:00:0021:00:00
05:15:0021:15:00
05:30:0021:30:00
05:45:0021:45:00
06:00:0022:00:00
06:15:0022:15:00
06:30:0022:30:00
06:45:0022:45:00
07:00:0023:00:00
07:15:0023:15:00
07:30:0023:30:00
07:45:0023:45:00
08:00:0000:00:00
08:15:0000:15:00
08:30:0000:30:00
08:45:0000:45:00
09:00:00

<colgroup><col width="64" span="15" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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