CREATE A FORMULA

Copper Contributor

Is it possible to write a formula to calculate the difference of two cells that have a time format?

3 Replies

@SRAMIREZ1026 

Yes. Let's say the start time is in A2 and the end time is in B2.

In C2, enter the formula

 

=B2-A1

 

and format C2 as h:mm.

 

If you want the difference in hours, use

 

=24*(B2-A2)

 

and format C2 as General or as Number.

 

If you want the difference in minutes, use

 

=1440*(B2-A2)

 

and format C2 as General or as Number.

@Hans Vogelaarthank you for your help. It worked

@Hans Vogelaar 

A minor improvement for time intervals might be 

[h]:mm

since that will not lose values greater than a day from the display.