Hi all,
Hoping to get some help with the following:
I'm looking to calculate the no. of business hours our enquiries have been open for, and the time taken to close enquiries (two separate lists and formulas).
For calculating enquiry open time, I want to take the current date and time and minus the date and time the enquiry was open (I'm in Australia so date formatting is dd/mm/yy. For example:
Current date and time = 24/05/2023 10:23 AM - enquiry open date and time 10/05/2023 2:44 PM. What I want to know is the total number of business hours, (represented in business days) the enquiry has been open. Our business hours are 9am to 5pm, Monday to Friday.
I'm having difficulty including enquiries that were opened outside of business hours and enquiries that have only just opened.
Similarly I am wanting to calculate the difference between enquiry open date and time and enquiry close date and time. This is what I've managed to come up with for close date and time - open date and time (open in column C and close in column D):
=MAX(IF(AND(TEXT(C43,"ddd")<>"Sat", TEXT(C43,"ddd")<>"Sun"),
IF(AND(TEXT(D43,"ddd")<>"Sat", TEXT(D43,"ddd")<>"Sun"),
NETWORKDAYS(C43,D43)-1,
NETWORKDAYS(C43,D43)
),
IF(AND(TEXT(D43,"ddd")<>"Sat", TEXT(D43,"ddd")<>"Sun"),
NETWORKDAYS(C43,D43)-1+(NETWORKDAYS(D43,D43)-1)*(MOD(D43,1)-TIME(17,0,0))/(TIME(17,0,0)-TIME(9,0,0)),
0
)
) + (MOD(D43,1)-MOD(C43,1))/(TIME(17,0,0)-TIME(9,0,0)), 0)
Previously I've done this by referencing a date calendar sheet, I am wondering if it's possible to do with a formula. Seems like it will be a very complicated one!
Thanks in advance for any suggestions!
Bookmarks