View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kaishain Kaishain is offline
external usenet poster
 
Posts: 4
Default COUNTIF to count rows with two conditions

I have a spreadsheet with 350 rows and two columns.

I want to count the number of rows which have BOTH the letter C in the first
column AND the letter Y in the second column.

I was thinking of using COUNTIF in a way similar to the following:

'=COUNTIF(G2:G350,"C")+COUNTIF(B2:B350,"Y")'

However, this counts the number of CELLS which contain EITHER of those two
letters. I want to count the number of ROWS with BOTH of those letters. I'm
guessing COUNTIF is the wrong command to use, but that I want something
similar to it.

Any suggestions would be much appreciated.

Thanks