ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   The difference between 4pm to 12am is coming up as -16.5 hours. (https://www.excelbanter.com/excel-discussion-misc-queries/244075-difference-between-4pm-12am-coming-up-16-5-hours.html)

pwide06

The difference between 4pm to 12am is coming up as -16.5 hours.
 
I am trying to calculate hours on Microsoft Excel and when I type in 4:00 PM
being the starting time and 12:00 AM as being the ending time it is giving
the result
of -16.5 hours worked when in reality it should be 7.5 hours worked. Can
anyone help me figure out why this is happening and how I can fix it? Thanks
in advance.

Bob Umlas[_3_]

The difference between 4pm to 12am is coming up as -16.5 hours.
 
12:00:00 AM is midnight of the current day (as I'm typing this, it's about
15.5 hours ago, not 8.5 hours from now).
So it's earlier than 4:00 PM. You should probably take a minute off each:
3:59:59 PM and 11:59:59 PM and it won't be negative, OR (better), put in the
date:
9/29/09 04:00 PM and 9/30/09 12:00:00 AM

"pwide06" wrote in message
...
I am trying to calculate hours on Microsoft Excel and when I type in 4:00
PM
being the starting time and 12:00 AM as being the ending time it is giving
the result
of -16.5 hours worked when in reality it should be 7.5 hours worked. Can
anyone help me figure out why this is happening and how I can fix it?
Thanks
in advance.




KC

The difference between 4pm to 12am is coming up as -16.5 hours.
 

A B
C
29-Sep-09 04:00 PM 30-Sep-09 12:00 AM 8:00

when it becomes 12:00 AM, it becomes next day.
so try to put in the entire date and time in the cells (and formate cells as
HH:MM, so it displays only the time)
and use the formula in C1 as

=B1-A1

-kc
*Click YES if this works

C1 returns 16:00 which is correct

"pwide06" wrote:

I am trying to calculate hours on Microsoft Excel and when I type in 4:00 PM
being the starting time and 12:00 AM as being the ending time it is giving
the result
of -16.5 hours worked when in reality it should be 7.5 hours worked. Can
anyone help me figure out why this is happening and how I can fix it? Thanks
in advance.


T. Valko

The difference between 4pm to 12am is coming up as -16.5 hours.
 
I type in 4:00 PM being the starting time and 12:00 AM
as being the ending time it is giving the result of -16.5
hours worked when in reality it should be 7.5


The result should be 8 hours unless you're subtracting an additional 1/2
hour.

For a result in decimal format:

A1 = start time
B1 = end time

=MOD(B1-A1,1)*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"pwide06" wrote in message
...
I am trying to calculate hours on Microsoft Excel and when I type in 4:00
PM
being the starting time and 12:00 AM as being the ending time it is giving
the result
of -16.5 hours worked when in reality it should be 7.5 hours worked. Can
anyone help me figure out why this is happening and how I can fix it?
Thanks
in advance.





All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com