Suming ifcount / isnumber totals

mkyb14

Board Regular
Joined
Aug 30, 2008
Messages
56
If by using this method is there a way to have it total the sum of the column of 1's produced without having to drag out each column and do the formula over and over.

=COUNTIF(A2:A206,"Male")
or
=IF(ISNUMBER(SEARCH("Male",A3:A101)),1,"")
This out puts a 1 next to each male in the column if true.

What about doing that, but having it just return a number of the total male count.
So, if Male + 18yrs = 12
if Male + 19yrs = 2

etc. which or what is the appropriate way to do this?

Thank you.
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

c_m_s_jr

Well-known Member
Joined
Mar 23, 2009
Messages
1,561
Without seeing a sample of your data try:

{=SUM(IF(ISNUMBER(FIND("Male",A1:A10)),1,""))}

confirm with ctrl+shift+enter to get the {}, do NOT enter the {} yourself.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
If by using this method is there a way to have it total the sum of the column of 1's produced without having to drag out each column and do the formula over and over.

=COUNTIF(A2:A206,"Male")
or
=IF(ISNUMBER(SEARCH("Male",A3:A101)),1,"")
This out puts a 1 next to each male in the column if true.

What about doing that, but having it just return a number of the total male count.
So, if Male + 18yrs = 12
if Male + 19yrs = 2

etc. which or what is the appropriate way to do this?

Thank you.

A3:A101 does apparently house the gender, that is, either Male or Female. What/which range does house the age values like "18yrs", "19yrs", etc.?
 

mkyb14

Board Regular
Joined
Aug 30, 2008
Messages
56
Ok I got that, thanks... can you tell me what the ctrl+shift+enter is doing, and why so I can learn?
 

mkyb14

Board Regular
Joined
Aug 30, 2008
Messages
56
to give you an idea of the data ... its a survey where the rows are mixed between male and female... I'm looking for a way to sort the males from the females and total their ages. So calling all Males, 18yrs old = output total number of 18yr olds. 2 or 54 ... how ever many took the survey.

http://www.wonderliver.com/downloads/master2.xlsx
sheet titled 18-29
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,123,402
Messages
5,601,475
Members
414,452
Latest member
Dannysamworth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top