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

P

pwide06

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.
 
B

Bob Umlas

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
 
K

KC

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
 
T

T. Valko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top