ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using COUNTIF to check values in multiple columns (https://www.excelbanter.com/excel-worksheet-functions/19560-using-countif-check-values-multiple-columns.html)

DTomSimpson

Using COUNTIF to check values in multiple columns
 
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.

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!
==============================================

"DTomSimpson" wrote in message
...
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.


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

-----Original Message-----
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.
.



All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com