Difference in time (in minutes)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
=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.
 
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.
 
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)
 
Back
Top