Countif? Multiple values


Posted by Paulo on October 15, 2001 1:40 AM

I know it must be simple, but I can't figure it out!
I want to do the following: count the total number of cells in A1:A20 that contain the values "r" or "p" or "n".

Many thanks.

Posted by Aladin Akyurek on October 15, 2001 2:35 AM

Try either

=COUNTIF(A1:A20,"r")+COUNTIF(A1:A20,"p")+COUNTIF(A1:A20,"n")

or

=SUMPRODUCT((A1:A20="r")+(A1:A20="p")+(A1:A20="n"))

Aladin

============



Posted by Paulo on October 15, 2001 2:53 AM

Thanks v. much (oh, so simple!) (NT)