# sum array

Posted by Ian on August 01, 2001 5:17 AM

Hi

can any one tell me what's wrong with this

{=SUM((C26:C45="permanent")*(D26:D45="csp")*(H26:H45<>0))}

column C: is status of someone's employment

column D: is job title

column H: is the values to add

the values are in time format and the return cell is set to Custom [h]:mm

the answer I'm getting is 144:00

which in general format is 6, which in turn is the number of the count() for the first 2 parts of the formula??? It seem to be ignoring the third part??

I could use

{=SUM(IF(C26:C45="permanent",IF(D26:D45="csp",H26:H45,0),0))}

and it works. I just wanted to find out how to make the other one work also.

Plus is there a reason to add () round the arrays:

e.g. {=sum(((A1:A10)="a")*(B1:B10)))

as apposed to sum((A1:A10="a")*(B1:B10)))

it seems to give the same result.

Thanks

Ian