countif function

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.
 
J

Jason Morin

=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
 

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