Countif, Multiple criteria
You're right. I read the question incorrectly.
And I tried to make the point about what happens at the borders with my note
about =. But I guess that I didn't make it well enough.
Herbert Seidenberg wrote:
COUNTIF(Range,"4") - COUNTIF(Range,"16") is not the same as
SUMPRODUCT(--(Range4),--(Range<16))
Besides, they count the wrong set.
Valid formulas are
=COUNTIF(Range,"<4")+COUNTIF(Range,"16")
=COUNTA(Range)-SUMPRODUCT((Range=4)*(Range<=16))
=COUNTA(Range)-SUMPRODUCT(NOT(Range<4)*NOT(Range16))
=SUMPRODUCT((Range<4)*(Range<16))+SUMPRODUCT((Rang e4)*(Range16))
--
Dave Peterson
|