Count Rows when certain conditions are met

G

Guest

I am trying to calculate the total number of rows in a table where certain
conditions are met. For example, to put in plain English:

count row 8 if k8=X and n8 = x
count row 9 if k9=x and n8=x
count row 10 if k10= x and n10=x
and so forth....to row 32

Total number of rows where this is true________

Thanks.
DMC
 
B

Bob Phillips

=SUMPRODUCT(--(K2:K32="x"),--(N2:N32="x"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

For example, if you want to count rows matching your criteria:
=SUMPRODUCT((H8:H32="x")*(N8:N32="x"))
If you want to sum the column X matching your criteria, adapt the previous
formula as follows:
=SUMPRODUCT(X8:X32*(H8:H32="x")*(N8:N32="x"))
 

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