![]() |
Count Rows when certain conditions are met
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 |
Count Rows when certain conditions are met
=SUMPRODUCT(--(K2:K32="x"),--(N2:N32="x"))
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "dmc0409" wrote in message ... 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 |
Count Rows when certain conditions are met
Try something like
=SUMPRODUCT((K8:K32="x")*(N8:N32="x")) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "dmc0409" wrote in message ... 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 |
Count Rows when certain conditions are met
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")) -- Bye V. "dmc0409" wrote: 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 |
All times are GMT +1. The time now is 07:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com