Military time not properly calulated

0

0be1

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
 
0

0be1

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 said:
=(C42-E42+(E42>C42))*24
Format as general

0be1 said:
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
 
T

Teethless mama

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

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

David Biddulph

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+(C42>E42) formatted as time, giving 4:20
or =(E42-C42+(C42>E42))*24 formatted as general if you want to convert to
hours.
--
David Biddulph

0be1 said:
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 said:
=(C42-E42+(E42>C42))*24
Format as general

0be1 said:
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
 
Top