Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Difference between times. Start time: 11:30PM End time: 5 AM

I need to calculate the difference between times. The tricky part is that the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Difference between times. Start time: 11:30PM End time: 5 AM

Try this,

Works for times over midnight and times on the same day

=(B1-A1+(B1<A1))*24

Mike

"Surrey" wrote:

I need to calculate the difference between times. The tricky part is that the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Difference between times. Start time: 11:30PM End time: 5 AM

=(B1-A1) will work unless you pass through midnight
=(B1-A1)+(B1<A1) will correctly add 1 (one day, that is, 24 hours) when B1
appears to be before A1 (ie you passed through midnight)
Try it with some of your data and tell me if you are happy with it
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Surrey" wrote in message
...
I need to calculate the difference between times. The tricky part is that
the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Difference between times. Start time: 11:30PM End time: 5 AM

Since XL stores times as fractional days, you can add 1 day if the span
crosses midnight. One way is to check if the end time is less than the
beginning time and use the fact that XL converts TRUE to 1 and FALSE to
0:

A1: 11:30PM
B1: 5:00AM
C1: =B1 - A1 + (B1<A1)


An alternative:

C1: =MOD(B1-A1,1)


In either case, format C1 as a time.

In article ,
Surrey wrote:

I need to calculate the difference between times. The tricky part is that the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Difference between times. Start time: 11:30PM End time: 5 AM

=MOD(B1-A1,1), but make sure you enter the times correctly.
11:30PM and 5:00AM would probably be interpreted as text;
11:30 PM and 5:00 AM are probably what you want.
--
David Biddulph

"Surrey" wrote in message
...
I need to calculate the difference between times. The tricky part is that
the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Difference between times. Start time: 11:30PM End time: 5 AM

You could enter time similar to military time. 11.50 (11:30 am) start and
17.00 (5:00 pm) as end time. That is if you are familiar with decimal half
hours and quarter hours. But the other responses may already have the fix
for you.

"Surrey" wrote:

I need to calculate the difference between times. The tricky part is that the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!

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
Calculate how much time falls between set start and stop times Polly Excel Worksheet Functions 17 September 3rd 08 12:12 PM
find the difference between start time and end time when spanning. wahoos Excel Discussion (Misc queries) 8 January 18th 08 06:02 PM
show time difference between start and end times erighter Excel Discussion (Misc queries) 6 July 23rd 07 10:22 PM
Time difference between two times GL Excel Worksheet Functions 1 March 7th 07 04:43 PM
HOURS DIFFERENCE IN TIME BETWEEN DIFFERENT DATES AND TIMES tankerman Excel Worksheet Functions 1 September 13th 05 04:31 PM


All times are GMT +1. The time now is 07:57 AM.

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

About Us

"It's about Microsoft Excel"