Formulas

  • Thread starter Thread starter Simon
  • Start date Start date
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
 
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
 
Back
Top