#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Time Calculation

I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Time Calculation

Try this:

=ROUND(MOD(arrive-depart,1)*24,2)

A1 = depart = 23:10
B1 = arrive = 1:55

=ROUND(MOD(B1-A1,1)*24,2)

Format as General or Number

--
Biff
Microsoft Excel MVP


"JB Bates" wrote in message
...
I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Time Calculation

Hi,

Times in a1 (Depart) and b1 (Arrival). Drag down as required

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

Mike

"JB Bates" wrote:

I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Time Calculation

Awesome, awesome, awesome! THANK YOU for the speedy response! JB

"T. Valko" wrote:

Try this:

=ROUND(MOD(arrive-depart,1)*24,2)

A1 = depart = 23:10
B1 = arrive = 1:55

=ROUND(MOD(B1-A1,1)*24,2)

Format as General or Number

--
Biff
Microsoft Excel MVP


"JB Bates" wrote in message
...
I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Time Calculation

If I also wanted to apply this to duty time, but where they may not be on and
off duty the same time can you advise how i would do that?

Duty On Duty Off
Leg 1 1300
Leg 2
Leg 3 2359

how can I have it look at the duty off column and keep looking till it finds
a time?

thanks

"T. Valko" wrote:

Try this:

=ROUND(MOD(arrive-depart,1)*24,2)

A1 = depart = 23:10
B1 = arrive = 1:55

=ROUND(MOD(B1-A1,1)*24,2)

Format as General or Number

--
Biff
Microsoft Excel MVP


"JB Bates" wrote in message
...
I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Time Calculation

If there's only one entry in each of On-Off but the cell address isn't
constant:

=MOD(MAX(C1:C5)-MAX(B1:B5),1)

Format as h:mm or [h]:mm

--
Biff
Microsoft Excel MVP


"JB Bates" wrote in message
...
If I also wanted to apply this to duty time, but where they may not be on
and
off duty the same time can you advise how i would do that?

Duty On Duty Off
Leg 1 1300
Leg 2
Leg 3 2359

how can I have it look at the duty off column and keep looking till it
finds
a time?

thanks

"T. Valko" wrote:

Try this:

=ROUND(MOD(arrive-depart,1)*24,2)

A1 = depart = 23:10
B1 = arrive = 1:55

=ROUND(MOD(B1-A1,1)*24,2)

Format as General or Number

--
Biff
Microsoft Excel MVP


"JB Bates" wrote in message
...
I am trying to calculate Flight Time - but the time enroute may or may
not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Time Calculation

When I use this formula, it works for anything PAST midnight but I don't get
a correct calculation if the time doesn't go past midnight. Will it not work
both ways?

"JB Bates" wrote:

I am trying to calculate Flight Time - but the time enroute may or may not
cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Time Calculation

You haven't told us which formula, nor what values you have when you "don't
get a correct calculation".

Try =MOD(B1-A1,1)*24 and format as general or number, not as time.
--
David Biddulph

mailrail wrote:
When I use this formula, it works for anything PAST midnight but I
don't get a correct calculation if the time doesn't go past midnight.
Will it not work both ways?

"JB Bates" wrote:

I am trying to calculate Flight Time - but the time enroute may or
may not cross over midnight.

IE:

Depart 23:10 Arrive 01:55 (looking for the result of 2.75 hours)
Depart 02:20 Arrive 02:45 (looking for the result of .42 hours)

Is there one formula I can use for all of column C to calculate time
regardless if it flies past midnight?

thanks



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
time calculation, 24:00 - 16:00 = 8 DaveB Excel Discussion (Misc queries) 4 February 7th 09 08:18 PM
Stop time - start time calculation squack21 Excel Worksheet Functions 5 December 10th 07 03:20 PM
Time calculation (Subraction of Idle Time) Ajay Excel Discussion (Misc queries) 6 March 4th 07 11:54 AM
Ignoring Time in a Date Time Calculation nmp Excel Worksheet Functions 3 November 23rd 05 08:32 PM
time calculation with military time Ron Thetford Excel Worksheet Functions 8 July 29th 05 07:24 PM


All times are GMT +1. The time now is 01:51 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"