COUNTIF for multi columns

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi All

How can I use COUTIF() function to say how many rows
there are with column A result=() AND ColumnB result=()?
 
Try SUMPRODUCT instead

Example: = SUMPRODUCT((A2:A100="Text1")*(B2:B100="Text2"))

Note that the ranges in cols A and B must be identical
and entire cols cannot be used (A:A, B:B) in SUMPRODUCT
 
Hi Peter,
Not with COUNTIF but with SUMPRODUCT
=SUMPRODUCT(--(A1:A100=?),--(B1:B100=??) where ? and ?? are the values you
are looking for
If you mean empty then use =SUMPRODUCT(--(A1:A100=""),--(B1:B100="")
Note you cannot use the all column notation (A:A ) in SUMPRODUCT
Best wishes
Bernard
 
Back
Top