Forum Discussion

Najat_abu_hamad's avatar
Najat_abu_hamad
Copper Contributor
Oct 01, 2019
Solved

Counting of business and non business hours white a ticket was open

Kindly your help I need your help in developing a formula to count the business and non business hours for a group of tickets.. I have data about entering and releasing time.. And i want to split the...
  • SergeiBaklan's avatar
    SergeiBaklan
    Oct 02, 2019

    Najat_abu_hamad 

    If add helper columns like this

    not to harcode constants, the formula could be

    =24*(
       IF(
          INT(Q2)-INT(P2)>2,
          NETWORKDAYS.INTL(P2+1,Q2-1,7),0
       ) +
       IF(
          INT(Q2)=INT(P2),
          MIN(MOD(Q2,1),$AF$2)-MAX(MOD(P2,1),$AE$2),
          ($AF$2-MAX(MOD(P2,1),$AE$2))*(WEEKDAY(P2,15)>2) +
          MAX(MOD(Q2,1)-$AE$2,0)*(WEEKDAY(Q2,15)>2)
       )
    )

    result in hours (e.g. 1.5 hour, not 01:30)