Countif in two columns and in different cells

F

ferde

I'm not sure which function I need to add text "p" and "cps" when this
data is in different columns. The total in this ex: would be p+cps = 2.
Any help would be greatly appreciated. I'm new at this.

shift class
p cps
p x
p x
p x
p cps

total p+cps = 2
 
P

PeterAtherton

ferde said:
I'm not sure which function I need to add text "p" and "cps" when this
data is in different columns. The total in this ex: would be p+cps = 2.
Any help would be greatly appreciated. I'm new at this.

shift class
p cps
p x
p x
p x
p cps

total p+cps = 2

Assuming that shift is in column A and class is in column b

=IF(AND(A2="p",B2="cps"),COUNTA(A2:B2),"")

Regards
Peter
 
R

RagDyer

Try this:

=SUMPRODUCT((A2:A100="P")*(B2:B100="cps"))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
Top