Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like Excel to return answer as zero if any of the values in that sum range is zero.

I have tried a combination of logical tests, but I can't get what I want.

share|improve this question
add comment

2 Answers

My immediate reaction was also multiplication but perhaps less computationally intensive would be to sum only if a zero is not found in the source.

Assuming the array is A1:C3:

=IF(COUNTIF(A1:C3,"=0")>0,0,SUM(A1:C3))
share|improve this answer
add comment

You could multiply all the values in the range. If one value is zero the result will be zero and then you can use that in a test to either multiply the sum by 0 or 1.

Cheers,

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.