Calculation Using Time

  • Thread starter Thread starter Rodney
  • Start date Start date
R

Rodney

How do I calculate the difference between two times, and subtract 30 minutes
if the time exceeds 8 hours?
 
Try this:

=MOD(B1-A1,1)*24-((MOD(B1-A1,1)*24>8)*30/1440*24)

Format as GENERAL or NUMBER

That'll return the the difference in decimal format: 8, 8.5, 10.75
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top