Formulas

S

Simon

I am trying to find a formula that will count 2 columns
and return one value.

For example : I want to count all cells in column B that
contain RI + cells in column A that Contain PC

A B
PC RI
SW RI
PC RI
PC AW

From the above example the answer should be 2, as only 2
rows contain the answer RI & PC.

Can anyone help???

Thanks
Simon
 
P

Peo Sjoblom

One way


=SUMPRODUCT(--(A2:A5="PC"),--(B2:B5="RI"))

that will count cell where A is PC AND B is RI, would return 2
in your example. If you meant to count A = PC + B = RI

=COUNTIF(A2:A5,"PC")+COUNTIF(B2:B5,"RI")

which would return 6
 

Ask a Question

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.

Ask a Question

Top