Countif over several worksheets

B

Barb Reinhardt

I'd like to have a countif equation over the range Sheet1:AA2, Sheet2:AA2,
Sheet3:AA2 and I want it count anything that is not equal to 2. How would I
write this.

Thanks,
Barb Reinhardt
 
G

Gary''s Student

COUNTIF() does not work over dis-joint ranges.

Try:

=(Sheet2!AA2<>2)+(Sheet3!AA2<>2)+(Sheet1!AA2<>2)
 
B

Bob Phillips

=SUMPRODUCT(COUNTIF(INDIRECT("Sheet"&{1,2,3}&"!AA2"),"<>2"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top