qr123
qr123

Reputation: 11

Excel: How to count rows based on specific values in columns?

I need to count the number of rows containing specific values in multiple columns. More specifically, to count these rows, I need to check columns with particular values in their headers. Take a look at the screenshot below:

Screenshot

I need to count all those rows which have an 'x' under at least one column that has 'APP' as a column header. In this case, there are two rows which have an 'x' under at least one column with APP as its header, and one row which does not. Is there any formula that will allow me to count this?

One brute force way of doing this would be to count if there are 'x's under columns with 'APP' headers and then counting all those rows which have more than zero. But if there is a way to simplify this that would be great.

Upvotes: 0

Views: 959

Answers (1)

JvdV
JvdV

Reputation: 75960

You could try (to count rows with "APP" in header and "x" in column):

=SUMPRODUCT((A1:G1="APP")*(A2:G4="x"))

Upvotes: 1

Related Questions