R
Robert
is it possible to have two criteria for a countif
statement like (COUNTIF(A1:A100,=2))or(COUNTIF
(A1:A100,"*2*"))
statement like (COUNTIF(A1:A100,=2))or(COUNTIF
(A1:A100,"*2*"))
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I thnk what you need is the OR function nested within the COUNTIF function:
(COUNTIF(OR(condition1,condition2))
...That won't work as the syntax is wrong ("*2*"), and it is an AND not OR
test. What is closest is
=SUMPRODUCT((A1:A100=2)+(ISNUMBER(FIND("2",A1:A100))))
but this counts a single 2 twice, so all you need is
=SUMPRODUCT(--(ISNUMBER(FIND("2",A1:A100))))
as I gave previously.
....Bob Phillips said:Harlan,
Seemingly yes, but it doesn't catch a singleton 2.
Harlan Grove said:Actually it'd catch "2", but it only works with cells containing text. It
fails on any numbers.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.