Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default calculating difference in time

how do we calculate the amount of time between two set times? for example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default calculating difference in time

=MOD(D2-B2,1), and format as [h]:mm
The MOD() formula allows for times running over midnight, so if you wanted
to work out the time from 10pm to 7am, =MOD(B2-D2,1) would do it for you.
If you want to convert to decimal hours, =24*MOD(B2-D2,1), and format as
number or general, not time.

You'll have to make sure you enter 7 am with the space, as 7am without a
space will be treated as text. Similarly with the pm.
--
David Biddulph

"tam25" wrote in message
...
how do we calculate the amount of time between two set times? for
example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default calculating difference in time

Hi,

You don't say which is the earlier time so the difference could be 3 hrs or
21 hrs:)

This formula will work it out the difference with the earlier time in B2

=IF(B2D2,D2+1-B2,D2-B2)

Use a custom format of hh:mm

Mike



"tam25" wrote:

how do we calculate the amount of time between two set times? for example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default calculating difference in time

9 or 15, not 3 or 21, Mike?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

You don't say which is the earlier time so the difference could be 3 hrs
or
21 hrs:)

This formula will work it out the difference with the earlier time in B2

=IF(B2D2,D2+1-B2,D2-B2)

Use a custom format of hh:mm

Mike


"tam25" wrote:

how do we calculate the amount of time between two set times? for
example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default calculating difference in time

it's early :)

"David Biddulph" wrote:

9 or 15, not 3 or 21, Mike?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

You don't say which is the earlier time so the difference could be 3 hrs
or
21 hrs:)

This formula will work it out the difference with the earlier time in B2

=IF(B2D2,D2+1-B2,D2-B2)

Use a custom format of hh:mm

Mike


"tam25" wrote:

how do we calculate the amount of time between two set times? for
example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating time difference then rounding down Angel Excel Discussion (Misc queries) 4 May 17th 07 09:16 AM
Calculating time difference in minutes jonhunt Excel Worksheet Functions 7 July 3rd 06 03:49 PM
Calculating Time difference based on a condition sonnethg Excel Discussion (Misc queries) 4 October 11th 05 09:25 PM
Calculating time difference over midnight! sygazelle Excel Discussion (Misc queries) 4 September 29th 05 04:59 PM
Calculating time difference Robyn Bellanger Excel Discussion (Misc queries) 2 December 23rd 04 02:29 AM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"