aberdeen-music

Want your banner here?   Don't want to see these?


Gaming & Technology The forum for all gaming and technology related discussion.

Reply
 
LinkBack Thread Tools
Old
  (#1 (permalink))

Neutral's Avatar


Profile
status: Offline
joined: Nov 2006
Default Spreadsheet Queries - 23-02-2008, 14:09

Hi, im trying to set up a timesheet for work but am having some trouble Heres a pic of what im trying to achieve and failing miserably



I'm using openoffice
   
Reply With Quote
Sponsored Links


Old
  (#2 (permalink))

nullmouse's Avatar


nullmouse is on a distinguished road with 6 influence and 18 reputation points.nullmouse is on a distinguished road with 6 influence and 18 reputation points.

Profile
status: Offline
joined: Aug 2003
location: Aberdeen
Default 23-02-2008, 14:37

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.
   
Reply With Quote
Old
  (#3 (permalink))

RossP's Avatar


RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.RossP is well respected with 6 influence and 72 reputation points.

Profile
status: Offline
joined: Aug 2003
bands: Strong Like Ox
talents: Survival. Table tennis.
location: Aberdeen
Default 23-02-2008, 14:57

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??
   
Reply With Quote
Old
  (#4 (permalink))

Frosty Jack's Avatar

1 Highscore

Profile
status: Online
joined: Aug 2003
bands: The Lorelei, and...
Default 23-02-2008, 15:50

Firstly you need to make sure the relevant columns are in the Time format.
Select columns B, C & D by clicking on the column headers, then right click and select 'Format Cells'. Under the first tab (Number) select 'Time', with the format xx:xx. Then when you enter the time use the format xx:xx with a colon separating the hours from the minutes.
Now use the following formula in column D -
=C2-B2+IF(B2>C2,24)

Everything should now be calculated in hours and minutes. The IF function allows for when your shift goes past midnight i.e. if your end time is a smaller number than your start time.
N.B. this is how it works in Excel, I'm presuming OpenOffice will be the same or similar.
   
Reply With Quote
Old
  (#5 (permalink))

nullmouse's Avatar


nullmouse is on a distinguished road with 6 influence and 18 reputation points.nullmouse is on a distinguished road with 6 influence and 18 reputation points.

Profile
status: Offline
joined: Aug 2003
location: Aberdeen
Default 23-02-2008, 16:06

Quote:
Originally Posted by Frosty Jack View Post
Firstly you need to make sure the relevant columns are in the Time format.
Select columns B, C & D by clicking on the column headers, then right click and select 'Format Cells'. Under the first tab (Number) select 'Time', with the format xx:xx. Then when you enter the time use the format xx:xx with a colon separating the hours from the minutes.
Now use the following formula in column D -
=C2-B2+IF(B2>C2,24)

Everything should now be calculated in hours and minutes. The IF function allows for when your shift goes past midnight i.e. if your end time is a smaller number than your start time.
N.B. this is how it works in Excel, I'm presuming OpenOffice will be the same or similar.
Sweet! I now know why I couldn't get it to work using 24h, I'd not changed the "Total Hours" column to be formatted as 'Time' as well, so it was returning values of '23.17708' instead of 04:15. I also made the 'IF' clause more complicated than it needed to be
   
Reply With Quote
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!! (Microsoft Works Spreadsheet) Bodast General Discussion 2 13-04-2005 12:20


All times are GMT. The time now is 21:10.

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
All web site content ©2001 - 2008, aberdeen-music