Forum Discussion

JuanAros's avatar
JuanAros
Copper Contributor
Oct 10, 2021
Solved

help

I want to know if it´s possible to calculate (to subtract, in fact) two different hours (Arrival and departure) in the same cell, and then sum up this with others cells from other days. I don´t know ...
  • HansVogelaar's avatar
    Oct 10, 2021

    JuanAros 

    Let's say the times are in A2:C2.

    Enter the following formula in D2. If you are NOT using Excel in Microsoft 365 or Excel 2021, confirm the formula with Ctrl+Shift+Enter.

     

    =SUM(MOD(TIMEVALUE(RIGHT(A2:C2,5))-TIMEVALUE(LEFT(A2:C2,5)),1))

     

    Format D2 with the custom number format [h]:mm

    Fill down if required.

Resources