Forum Discussion

Onlinehelp's avatar
Onlinehelp
Copper Contributor
May 22, 2021
Solved

Total hours between two time ranges

Hello,   I would like to find the total hours between 7:30 am to 12:30 pm on same day in excel. TIME TOTAL HOURS 7:30 to 12:30 ?   Please guide. Thank you so much.
  • SergeiBaklan's avatar
    SergeiBaklan
    May 22, 2021

    Onlinehelp 

    As variant

    with

    =SUM(
       IFERROR(
         MOD(RIGHT(C7:I7, LEN(C7:I7)-SEARCH("-",C7:I7)) -
             LEFT(C7:I7, SEARCH("-",C7:I7)-1),
         0.5),0))

    but it very depends on do you have overnight shifts or not and do you keep exactly the same format for all time periods.

Resources