Time to Hours

  • Thread starter Thread starter DapperDom
  • Start date Start date
D

DapperDom

I want to use only a start and end time.
*24 works great for the day shift, but the night shift is wrong.
Does anyone know how to correct this ?
 
What numbers are you using, what formula, what result, & what did you
expect?
If you are using =24*(B1-A1), you may want to try =24*MOD(B1-A1,1)
 
A is time start, B is time stop, C =B - A, D is C*24 (number of hours). This
works fine for 8:00 AM to 5:00 PM, But from 5:00 PM to 8:00 AM it is wrong.
 
hi
do you have a date attached to the time. the problem may be that you are
crossing over into the next day. without a date as reference, xl gets
confused. try adding a date to your start and stop times and format to time
hh:mm. i think you'll get the correct results then.

Regards
FSt1
 
hi again.
after thought.
convert your times to serial numbers ie format to general. with and without
the date.
you'll understand whats going on better.

Regards
FSt1
 
So, have you tried C =MOD(B-A, 1) ? That should solve your problem.

[Note that if you want help it's better not just to say "it is wrong", but
to tell the group what error message you are getting, or what wrong result,
and what you think the right answer should be. That way it is more likely
that someone will be able to help you.]
 
David B formula should do the trick, or you could try this formula

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

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

Back
Top