View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Excel 2002 - EMPLOYEE WEEKLY SCHEDULE

I am not clear why you get 18 hours, my calculation says 32.5.

This calculates that, format the result as [h]:mm

=SUM(MOD(IF(MOD(COLUMN(C4:O4),2)=1,C4:O4)-IF(MOD(COLUMN(B4:N4),2)=0,B4:N4),1))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Timithesis" wrote in message
...
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