Forum Discussion
Bob_m_m
Jan 11, 2023Copper Contributor
Excel one cell formula for calculating Actual SLA End date & time
Criteria 22:00 - 08:00 - Freezing time SLA - 6 Hrs from Registered Date & Time
- Jan 11, 2023
JoeUser2004 i think Bob_m_m wanted a formula to calculate the END time not how much time is in between 2 values. Here is my formula (that works on older excel):
=IF(E6+6/24<=INT(E6)+$D$3,MAX(E6,INT(E6)+$E$3)+6/24,$E$3+1+6/24-$D$3+MIN(E6,INT(E6)+$D$3))
and using the newer LET:
=LET(in,E6, delay,6/24, dEnd,$D$3, dStart,$E$3, d,INT(in), h,in-d, freeze,1-dEnd+dStart, IF(h+delay<=dEnd,MAX(in,d+dStart)+delay, freeze+delay+MIN(in,d+dEnd)))
this version is a little easier if you need to tweak values and hopefully a little easier to understand/see what is being done.
mtarler
Jan 11, 2023Silver Contributor
Bob_m_m i don't understand. The numbers given aren't +6hrs in the 2nd column. In the attached I show the difference and a formula for finding the orginal + 6hrs, which is simply take the original date-time and add 6/24 (i.e. # hrs / 24 hrs)
=A1 + 6/24
- Bob_m_mJan 11, 2023Copper Contributorit is 6hrs excluding night excluding criteria from night 10PM to morning 8AM