View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default Excel 2002 - EMPLOYEE WEEKLY SCHEDULE

If it comes back negative then you have a start time before an end time, eg
start at 1pm, finish at 11am.


"Timithesis" wrote:

Sam,
I formatted the cells B4:O4 as "h:mm" using the "Category-Custom" option;
I did make Q4: =int(P4) & R4: =(P4-Q4 )*60
And I cell formatted Q4:R4 as a number (no decimal places)

P4 is the calculation, but I don't think it's the right formula (because it
doesn't work); the little popup says "Negative dates or times are displayed
as ####".

Should there be something prior to the formula such as :
=SUM(((C4-B4)+(E4-D4)+(G4-F4)+(I4-H4)+(K4-J4)+(M4-L4)+(O4-N4))*24)
=TIMEVALUE(((C4-B4)+(E4-D4)+(G4-F4)+(I4-H4)+(K4-J4)+(M4-L4)+(O4-N4))*24)
=TIME(((C4-B4)+(E4-D4)+(G4-F4)+(I4-H4)+(K4-J4)+(M4-L4)+(O4-N4))*24)
=HOUR(((C4-B4)+(E4-D4)+(G4-F4)+(I4-H4)+(K4-J4)+(M4-L4)+(O4-N4))*24)

The number that I should see in P4 is 18 the number I get now is negative 28

thanks for trying to help me though, do you have any other ideas??

================================================== ===

P4 needs to be the TOTAL HOURS worked for week B4 thru O4 (to also adjust
for 30 minute
lunch for any shift greater then 5 hours). Note: employee "OFF" Sunday thru
Wednesday (I plan on leaving the "OFF" days blank or empty)

B4 thru O4 should be "cell formatted) as ??
General?? Time?? Custom h:mm AM/PM?? or something else??

(((C4-B4)+(E4-D4)+(G4-F4)+(I4-H4)+(K4-J4)+(M4-L4)+(O4-N4))*24)

I know I am close to figuring this out, but I am seeking the final formula!!
that's a close as I seem to get..........H..E..L..P