countif function

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

How can I perform the countif function when I want to have
several criteria (ex. I want to counif my spreadsheet
contains PT and DM in the same row)

1 PT KS DM
2 JH MI CD
3 JH WI DM
4 PT HI AD

It would come back and tell me that there was 1 count.
 
=SUMPRODUCT((COUNTIF(INDIRECT(ROW(rng)&":"&ROW(rng)),"PT")
0)*(COUNTIF(INDIRECT(ROW(rng)&":"&ROW(rng)),"DM")>0))

where "rng" is a defined name for your range.

HTH
Jason
Atlanta, GA
 
Back
Top