#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Time to Hours

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 ?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Time to Hours

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)
--
David Biddulph

"DapperDom" wrote in message
...
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 ?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Time to Hours

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.

"David Biddulph" wrote:

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)
--
David Biddulph

"DapperDom" wrote in message
...
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 ?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Time to Hours

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

"DapperDom" wrote:

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.

"David Biddulph" wrote:

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)
--
David Biddulph

"DapperDom" wrote in message
...
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 ?




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Time to Hours

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

"FSt1" wrote:

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

"DapperDom" wrote:

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.

"David Biddulph" wrote:

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)
--
David Biddulph

"DapperDom" wrote in message
...
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 ?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Time to Hours

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 Biddulph

"DapperDom" wrote in message
...
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.

"David Biddulph" wrote:

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)
--
David Biddulph

"DapperDom" wrote in message
...
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 ?






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Time to Hours

David B formula should do the trick, or you could try this formula

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


"DapperDom" wrote:

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 ?

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
calculating timesheet, time-in/time-out = total hours & minutes, . Steve Lindsay Excel Worksheet Functions 13 November 8th 06 03:45 PM
How do add time/hours to get answer in hours if Ans24 Fran Excel Worksheet Functions 2 May 20th 06 05:50 AM
template or formula for start time -finish time -total hours ple cc New Users to Excel 1 March 27th 06 06:06 PM
How do I time Hours & mins in excel - Time sheet Helen Excel Discussion (Misc queries) 5 September 17th 05 11:42 AM
Convert hours and minutes in time format into fractions of hours.. Akern Excel Worksheet Functions 4 April 21st 05 02:56 PM


All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"