Count 2 values in one column and 1 val in oth [Solved/Closed]

Report
-
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
-
Hello,

I have two column lists (two values in first column and one value in the other)

e.g. Column A has the following values: A B C B B A C

Column B has the following values: Yes


I need a formula to count how many A's & B's there are if column B is = Yes

Please help

1 reply

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
800
suppose sample data is like this (row 1 has headings H1 and H2)

H1 H2
A YES
B YES
C
B YES
B YES
A
C YES


try this formula in an empty cell

=SUMPRODUCT((A2:A8="B")*(B2:B8="yes"))
you will get 3

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!