Time Calculation

J

John

How can I subtract two cells that have time references in to show number of
hours between the two.

eg

A1 = 7:00am
B1 = 3:00pm

Answer should be 8 hours

I have a second problem in that one hour may be in a different day

eg

A1 = 7:00am (on a Monday)
B2 = 1:00 am (on a Tuesday)

FYI I'm just trying to calculate easily Trading hours

Thanks

John
 
J

John

Thanks Aladin

But with hours of:

Opening 7:00am
Closing 1:00am (next morning)

Your formula would give 6:00pm, instead of 18 hours
 
B

Bob Phillips

It gives 18 hours in my test. Sure you don't have 7:00pm in the cell?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

John

Thanks Bob and Aladin

I had the format as h:mm AM/PM, removing the AM/PM it returns 18:00

Thanks
 

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

Similar Threads


Top