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 Military time not properly calulated

I have two cells that are set for h:mm and the time will switch throughout a
24 hour time period. For some reason ever fix I have tried, the time is still
not calculated properly.

For example:

The first cell is 10:18PM [h:mm] and the second 2:38AM [h:mm] and the
resultant cell has the formula (currently) as:

=C42-E42+(C42<=E42)*2400
I have also tried

=MAX(E42,C42)-MIN(C42:E42)

Both formulas return a value of 19:40. The difference between 10:18PM to
2:38AM the following day shows up as 19:40. Shouldn't the result be like 4
hours and 20 minutes. Or at least that is what I am trying to attempt the
output to be.

Does anyone have the answer?

tia...

Shawn
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Military time not properly calulated

=(C42-E42+(E42C42))*24
Format as general

"0be1" wrote:

I have two cells that are set for h:mm and the time will switch throughout a
24 hour time period. For some reason ever fix I have tried, the time is still
not calculated properly.

For example:

The first cell is 10:18PM [h:mm] and the second 2:38AM [h:mm] and the
resultant cell has the formula (currently) as:

=C42-E42+(C42<=E42)*2400
I have also tried

=MAX(E42,C42)-MIN(C42:E42)

Both formulas return a value of 19:40. The difference between 10:18PM to
2:38AM the following day shows up as 19:40. Shouldn't the result be like 4
hours and 20 minutes. Or at least that is what I am trying to attempt the
output to be.

Does anyone have the answer?

tia...

Shawn

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Military time not properly calulated

Theetless mama;

Thanks for the reply. I have tried this formatting only my output cell and I
get:

19.66666667 as a result. Did I not follow your directions properly or
something?

Shawn

"Teethless mama" wrote:

=(C42-E42+(E42C42))*24
Format as general

"0be1" wrote:

I have two cells that are set for h:mm and the time will switch throughout a
24 hour time period. For some reason ever fix I have tried, the time is still
not calculated properly.

For example:

The first cell is 10:18PM [h:mm] and the second 2:38AM [h:mm] and the
resultant cell has the formula (currently) as:

=C42-E42+(C42<=E42)*2400
I have also tried

=MAX(E42,C42)-MIN(C42:E42)

Both formulas return a value of 19:40. The difference between 10:18PM to
2:38AM the following day shows up as 19:40. Shouldn't the result be like 4
hours and 20 minutes. Or at least that is what I am trying to attempt the
output to be.

Does anyone have the answer?

tia...

Shawn

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Military time not properly calulated

Let's say your
C42 =20:00
E42 =3:00 (3 am the next day)

=(E42-C42+(C42E42))*24
the result will be 7 hours


"0be1" wrote:

I have two cells that are set for h:mm and the time will switch throughout a
24 hour time period. For some reason ever fix I have tried, the time is still
not calculated properly.

For example:

The first cell is 10:18PM [h:mm] and the second 2:38AM [h:mm] and the
resultant cell has the formula (currently) as:

=C42-E42+(C42<=E42)*2400
I have also tried

=MAX(E42,C42)-MIN(C42:E42)

Both formulas return a value of 19:40. The difference between 10:18PM to
2:38AM the following day shows up as 19:40. Shouldn't the result be like 4
hours and 20 minutes. Or at least that is what I am trying to attempt the
output to be.

Does anyone have the answer?

tia...

Shawn

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Military time not properly calulated

You've got your formula back to front. You need to subtract start time from
finish time, not vice versa.

If 10:18 PM is your start time in C42, and 2:38 AM is your finish time in
E42, then your formula is
=E42-C42+(C42E42) formatted as time, giving 4:20
or =(E42-C42+(C42E42))*24 formatted as general if you want to convert to
hours.
--
David Biddulph

"0be1" wrote in message
...
Theetless mama;

Thanks for the reply. I have tried this formatting only my output cell and
I
get:

19.66666667 as a result. Did I not follow your directions properly or
something?

Shawn

"Teethless mama" wrote:

=(C42-E42+(E42C42))*24
Format as general

"0be1" wrote:

I have two cells that are set for h:mm and the time will switch
throughout a
24 hour time period. For some reason ever fix I have tried, the time is
still
not calculated properly.

For example:

The first cell is 10:18PM [h:mm] and the second 2:38AM [h:mm] and the
resultant cell has the formula (currently) as:

=C42-E42+(C42<=E42)*2400
I have also tried

=MAX(E42,C42)-MIN(C42:E42)

Both formulas return a value of 19:40. The difference between 10:18PM
to
2:38AM the following day shows up as 19:40. Shouldn't the result be
like 4
hours and 20 minutes. Or at least that is what I am trying to attempt
the
output to be.

Does anyone have the answer?

tia...

Shawn



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
How to I convert standard time to Military or 24 hour format? Nacho Excel Discussion (Misc queries) 5 June 28th 06 07:14 PM
Military time trouble darkbearpooh1 Excel Worksheet Functions 7 February 19th 06 10:58 AM
Using military time but with 100 minutes not 60 minutes srwamp Excel Discussion (Misc queries) 7 November 21st 05 09:41 AM
in excel totaling weekly hours military time mel Excel Worksheet Functions 1 January 17th 05 04:24 PM
How do I convert Military Time to minutes? Rachael Excel Worksheet Functions 1 January 6th 05 10:01 PM


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