It does not seem possible for countif to read an array of
non contiguous cells therefore either combine countif
statements eg
=COUNTIF(D9,"=p")+COUNTIF(D11,"=p")+COUNTIF(D20,"=*p*")
Note, wildcards do appear to work as in COUNTIF
(D20,"=*p*") where D20 will be counted if a p is any part
of its text content.
Alternatively previous post by Len Meads:
To count the number of entries in more than one range that
exceeds the value in a referenced cell, try the following.
Assume the ranges are Y4:Y500, Z4:Z500, and the referenced
cell is A1.
Name the range containing contiguous cells Y4:Z500, say
Group.
Use =COUNTIF(Group,">"&A1)
Assume the ranges are X4:X500, Z4:Z500, and the referenced
cell is A1.
Use =COUNTIF(X4:X500,">"&A1)+COUNTIF(Z4:Z500,">"&A1)
It does not seem possible for COUNTIF to use a single
named range composed of noncontiguous cells.
Paul Moles