View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Counting Nonblank cells based on criteria in another cell

Maybe one way:

=SUMPRODUCT(--(A2:A10000=1),--(B2:B10000<0))

HTH,
Paul

wrote in message
ps.com...
I am trying to count the number of cells that have text in them when
the criteria is met in another cell.

Severity Reason Code
1 Contacted client
2 Resolved updated late
2 Contacted Client
3

I need the formula to calculate the total number of reason codes by
severity. I have tried so many ways to write the formula and the
majority of the time the result is a count of the blank cells or just
the number 1 even when there is no reason code entered.

=IF(A2:A10000="1",COUNTA(B2:B10000,0))

Any help would be greatly appreciated