View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Pls Help - blank cell/formula issue

Hi Shokra,

Am Sat, 10 Nov 2012 03:57:16 +0000 schrieb Shokra:

Description of Sheet & Calculations:

C9 thru L9
Each week of the A2 year/month & A9 beginging & ending wk day(s) of the
months pay period
A10-16 Days of Wk

Week 1 = work days from 29.10 - 04.11
C10 = 8.5 hrs wk
C11 = 8.5 hrs wk
C12 = 8.5 hrs wk
C13 = 8.5 hrs wk
C14 = 8.16 hrs wk (8 hrs 10 mins)
C15 = off
C16 = off

C17's formula is:
=((C10-0.5)+(C11-0.5)+(C12-0.5)+(C13-0.5)+(C14-0.5)+(C15-0.5)+(C16-0.5))
It works - sort of! Basically I want it to add up add C10-C16, if the
work day is blank, it ignore that cell, then based on how many cells
have hrs entered it #ofcells *0.5 to obtain the hours of break time
(unpaid), then breakhrs - Wk hrs = Total wkly hrs


you can't substract unpaid breaks if there is no worktime. If you only
get unpaid breaks with 6 or more hours of work then try in C17:
=SUM(C10:C16)-COUNTIF(C10:C16,""&6)*0.5
In other case modify to suit.
Every time over 8.5 hours is overtime. Then in D10:
=IF(C10="",0,C10-8.5) and copy down. D10 to D13 = 0
D14 = -0.34 because she worked less than 8.5 hours. D15 and D16 = 0
because she didn't work.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2