View Single Post
Old 23-02-2008, 14:57   #3 (permalink)
RossP

 
RossP's Avatar

RossP is an ambassador of goodwill with 95 reputation points.RossP is an ambassador of goodwill with 95 reputation points.RossP is an ambassador of goodwill with 95 reputation points.RossP is an ambassador of goodwill with 95 reputation points.

Profile
location: Aberdeen
joined: Aug 2003
posts: 2,362
bands: Tony Cascarino Discopants; AnyManSave
talents: Survival. Table tennis.

Default

Quote:
Originally Posted by nullmouse View Post
I don't know how to do it using proper times, but if you express times as hours plus minutes as decimal (e.g. 21.00 would be 9:00pm, 1.25 would be 1:15am) then this should work:

=((IF(C2<B2,C2+24,C2))-B2)

Where B2 = Start time, C2 = End time, as per your screen shot.

Obviously not ideal, but I don't know how to do it using actual times :/

I should say this works in Microsoft Excel, but should work in most spreadsheets - The IF formula is to adjust any times in am to be 24 hours greater than the pm start time, to allow subtraction to get the hours. This obviously assumes you don't work shifts of longer than 24h The second clause if the IF statement allows you to enter end times of before midnight the same day.
Any chance you can take my Higher Admin classes later in the year so I can go to Macedonia and Iceland for the Scotland games??
RossP is offline   Reply With Quote