Difference in time (in minutes)

M

Maynard

Hi. I want to subtract one time from another, and display the result in minutes. My problem is that sometimes the time crosses over midnight.

A B
23:50 1:45
My result should be: 115 (the total number of minutes between these two times)

Thanks
 
B

Bob Phillips

If the result crosses midnight, add 1 to it, and multiply the whole result
by 24 by 60.

For instance,

=(B1-A1+(--A1>B1))*24*60

and format as General


--

HTH

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

Maynard said:
Hi. I want to subtract one time from another, and display the result in
minutes. My problem is that sometimes the time crosses over midnight.
 
T

Tom Ogilvy

=MOD(End-Start,1)

Format as Time

--
Regards,
Tom Ogilvy


Maynard said:
Hi. I want to subtract one time from another, and display the result in
minutes. My problem is that sometimes the time crosses over midnight.
 
T

theroo

Bob,
Excel is very smart. If you enter your values as date-time excel automatically handles the cross over midnight. Enter your values this way 11/8/02 23:25. The trick is date SPACE time. You can choose whatever date/time format you want but enter both in the same cell separated by a space. Amazing ain't it.
 
A

Aladin Akyurek

The -- bit is not needed.

Bob Phillips said:
If the result crosses midnight, add 1 to it, and multiply the whole result
by 24 by 60.

For instance,

=(B1-A1+(--A1>B1))*24*60

and format as General


--

HTH

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


minutes. My problem is that sometimes the time crosses over midnight. these
two times)
 

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

Top