Thread: Timesheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Timesheet

the problem is the 37:00 is not really 37:00 but is storesd as 1.54 which is
the number of days. If you format the cell as a number instead of the
date/time you wil see this number. To get back to the number of hours use

= A1 * 24 (make sure the cell is formated a number and not time).

To get minutes, seconds, and hours

=60 * mod(A1 * 24,1) <=this is the number of minutes, fraction times 60
= 60 * (60 * mod(A1 * 24,1)) <= this is seconds
= int(A1) <=hours, whole number


"Zaf" wrote:

PLEASE IGNORE THE PREVIOUS MESSAGE POSTED BY MYSELF!

I am currently attempting to work out the flexi time earned and taken in a
week. The problem i am having is that if some one is taking flexi they would
have had to work more than 37:00 hours a week, so if they haven't the flexi
is a minus time. I need help with adding to times togeather in the format
[h]:mm only if two conditions are met which are that an "F" needs to placed
in a cell to confirm flexi being taken and one of the cells that need to be
added must be greater the 0:00. If flexi has been earned by working over
37:00 hours and not taken then it must role over to the following week, as
must the flexi hours that have not been earned (i.e less than 37:00 hours
worked, so the
flexi is a minus time) also ned to be rolled over, so that the employee can
make up the time. Than i need to clear the cell at the end of the week
because if an employee has taken the the flexi then the cell needs to be
cleared, also if the flexi is not taken due to not having any flexi to take
(worked less than 37:00 hours) or out of personal choice than the flexi rolls
over either way as i have explained above, so again the cell will need to be
cleared, SO what ever happens with the flexi i will need to clear the cell
with some code in the final part of the formulae i am having trouble with.

These are the attempts that i have made with no luck;

=IF(AND(E10="F",H400),H36+H40,H40="")

=IF(E10="F",H36+H40,TEXT(H40,"-[h]:mm"))

=IF(E10:J10="F",TEXT(H36+H40,"[h]:mm"),TEXT(H40+I40,"[h]:mm"))

Any guidence would be greatly appreciated.