On Aug 30, 2:51*am, "Mario" <im...@home.com> wrote:
> 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/...ry/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.