Calculate time worked

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

Hi I'm playing around trying to create a work sheet,
and don't know how to create the formula syntax.

start time X= 0700 in C1
end time Y= 1900 in C2

Total hrs worked Z= 12 in C3

What would the formula be to calculate Z?

TIA.
 
start time X= 0700  in C1
end time   Y= 1900 in C2
Total hrs worked Z= 12 in C3
What would the formula be to calculate Z?

Ostensibly:

=(TIME(INT(C2/100),MOD(C2,100),0)-TIME(INT(C1/100),MOD(C1,100),0))*24

which works whether X and Y are text or numeric.

You neglect to say how you want to handle fractional hours.

Also, you neglect to say whether X<=Y is always true, or if X>Y might
true if the time period spans midnight.

PS: For broader participation, you might want to post future
inquiries using the MS Answers Forums at
http://social.answers.microsoft.com/Forums/en-US/category/officeexcel.
It's not that I like that forum. It's just that MS has ceased to
support the Usenet newsgroups. Hence, participation here is limited
to the sites that share a common newsgroup mirror, which is no
longercentralized at MS.
 
Back
Top