View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Formula for calculating target hours against actual hours

Hi,

Am Tue, 4 Jun 2013 17:44:05 +0100 schrieb Bootface:

Thanks again Claus this is really good. Just one more query if I have
some weeks where 0 hours are completed my target figure in F2 changess
or shows as #REF!. Is there a way of stopping this?


If you have cells with 0 then change your formula in B2 to:
=IF(C1="",B1,(300-SUM($C$1:C1))/COUNT(A2:$A$60))

Do you have headers in your table? The error #REF! is not because the 0.
If you have the formula for a table with headers and you delete the
first row the error comes.
If you don't have headers use:
=SUM(OFFSET($C$1,,,COUNT($C:$C)))+SUM(OFFSET($B$1, COUNTA($C:$C),,52-COUNT($C:$C)))
If you have headers use the formula of the workbook in SkyDrive


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