Forum Discussion
JuanAros
Oct 10, 2021Copper Contributor
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 ...
- Oct 10, 2021
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.
HansVogelaar
Oct 10, 2021MVP
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.
JuanAros
Oct 10, 2021Copper Contributor
It works perfectly, thanks a lot mate!