Excel Formula with two clauses

J

jmrd

How can I enter a formula in excel that counts two text clauses. For instance:
If range A1:A50=John AND range B1:B50=Smith, count 1?
 
B

Bob Phillips

=SUMPRODUCT(--A1:A50="John"),--(B1:B50="Smith"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top