Using COUNTIF to check values in multiple columns

D

DTomSimpson

I want to be able to check those identified as Male in Column A who voted YES
in Column G. COUNTIF appears to work to check count of males or who voted
YES but I can't seem to figure out how to find out how many MALES voted YES.

I'm new to this, so I'm confident this is something easy that I just haven't
found yet.
Your help is appreciated.
 
R

RagDyer

Enter the gender you're looking up in B1 (Male, Female),
And the answer (Yes, No) in H1,

And try this formula:


=SUMPRODUCT((A2:A100=B1)*(G2:G100=H1))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

I want to be able to check those identified as Male in Column A who voted
YES
in Column G. COUNTIF appears to work to check count of males or who voted
YES but I can't seem to figure out how to find out how many MALES voted YES.

I'm new to this, so I'm confident this is something easy that I just haven't
found yet.
Your help is appreciated.
 
B

Biff

Hi!

Try this:

=SUMPRODUCT(--(A1:A100="Male"),--(G1:G100="Yes"))

Or, use cells to hold the criteria:

H1 = Male
I1 = Yes

=SUMPRODUCT(--(A1:A100=H1),--(G1:G100=I1))

Biff
 

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