Formula for Time in Excel

  mgmcc 16:09 05 Jul 2009

I'm looking for the formula to subtract one time from another and give the answer in hours to 2 decimal places, not hours and minutes.

In other words, Start 08:00 Finish 18:15 - I want an answer of 10.25 hours, not 10:15 (ten hours, 15 mins).

  Simsy 18:36 05 Jul 2009

of how you format the cell... and how you have the formula...

You need to have the cell with the answer in formatted as a number, (to 2 decimal places, as that's what you seem to want). This will give the answer as a fraction of 1 day...

Then have your formula, (=B2-A2), and multiply it by 24 to give the answer in hours...

eg if the start is in A2, and the end is in B2, the fomula would be;




  mgmcc 18:59 05 Jul 2009

Many thanks, exactly what I was looking for.

  VoG II 20:11 05 Jul 2009

If your times can span midnight then you need


  mgmcc 13:49 06 Jul 2009

Some of the times do span midnight but I'd actually got round this with an "IF" statement - if the subtraction resulted in a negative number, 24 was added to it. However, I'll have a play about with your formula.


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Dell XPS 13 9370 (2018) review

No need to scan sketches into your computer with Moleskine's new smart pen

HomePod review

Streaming : Netflix ou Amazon Prime Video ?