Calculating the minutes between two times

  • Thread starter Thread starter David Kuhn
  • Start date Start date
D

David Kuhn

Hello all,

A time card application:
If I enter a start time in a cell and a ending time in another cell,
how to I calculate the minutes in-between?

For example, a cell contains 6:00 AM and another cell contains
2:30PM. I know that is 8 hours worked (with half hour lunch). How
can I have Excel calculate 8.5 hours or 510 minutes?

Thanks kindly.

Dave Kuhn
 
David,

Either,

if you want to maintain the answer as time, format the cell as [mm]

if you want a decimal number of minutes, use the formula =(D1-C1)*24*60

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
If the earlier time is in A1 and the later time in B1, use
=HOUR(B1-A1)*60+MINUTE(B1-A1).

Note that if the time spans midnight, you need to specify date+time.
Alternatively, and relying on some implicit data conversions, it is
possible to cater to one midnight crossing with the formula =((B1-A1)+
(B1<A1))*24*60

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top