Help with CountIF functions in Excel 2003

Mumov1

New Member
Joined
Feb 26, 2016
Messages
2
Please can anyone help!

I am trying to enter a countif function in order to calculate the number of yes & no's to male & females!

In one column I have 'Y & N' & in a 2nd column 'M & F'. I need to be able to calulate the number of Male Yes & No' & the number of female Yes & No.

Hope this make sense.

I have been using this function of add the number of females & males with this function:

=COUNTIF(K4:K100,"*"&P20&"*")

I don't know if this is possible or If I need to alter the way I collate this data.

Any advice will be gratefully appreciated.

Helen
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi,

Are you looking for something along these lines;


Excel 2012
ABCD
1MY5
2MN1
3FY2
4FN4
5GenderResponse
6MY
7MN
8FY
9FN
10MY
11FN
12MY
13FN
14FY
15FN
16MY
17MY
18
Sheet1
Cell Formulas
RangeFormula
D1=COUNTIFS(A:A,"M",B:B,"Y")
D2=COUNTIFS(A:A,"M",B:B,"N")
D3=COUNTIFS(A:A,"F",B:B,"Y")
D4=COUNTIFS(A:A,"F",B:B,"N")
 
Last edited:
Upvote 0
Hi Max,

I don't think sumifs will work, as the OP works in a Excel 2003 environment, where sumifs isn't present yet.
Use sumproduct instead. (formula below for the female yes count. I'm sure you can work out the other cases.)

sumproduct(--(A1:A100="F"),--(B1:B100="Y"))

sumproduct formulae require to use the same length ranges and can't handle full column references. (don't substitute A1:A100 for A:A)
 
Upvote 0
Sorry,

Did not realise that Excel 2003 did not support COUNTIFS, so have a another go with something like this;


Excel 2012
ABCDE
1Excel20122003
2MY55
3MN11
4FY22
5FN44
6GenderResponse
7MY
8MN
9FY
10FN
11MY
12FN
13MY
14FN
15FY
16FN
17MY
18MY
19
Sheet1
Cell Formulas
RangeFormula
D2=COUNTIFS(A:A,"M",B:B,"Y")
D3=COUNTIFS(A:A,"M",B:B,"N")
D4=COUNTIFS(A:A,"F",B:B,"Y")
D5=COUNTIFS(A:A,"F",B:B,"N")
E2=SUMPRODUCT(--(A$7:A$18="M"),--(B$7:B$18="Y"))
E3=SUMPRODUCT(--(A$7:A$18="M"),--(B$7:B$18="N"))
E4=SUMPRODUCT(--(A$7:A$18="F"),--(B$7:B$18="Y"))
E5=SUMPRODUCT(--(A$7:A$18="F"),--(B$7:B$18="N"))
 
Upvote 0
Hi

Sorry for not replying sooner, only had a chance to try this out today.

I have tried what you suggested but just returns 0. I am beginning to wonder if I should just conceed to the face that we run a very outdated system in work & it can't be done in 2003.

I have attached an example of what I am trying to achieve.


Failed image removed by moderator
 
Last edited by a moderator:
Upvote 0
I have attached an example of what I am trying to achieve.
Clearly, that didn't work. My signature block below has a link for more information about posting small screen shots, & where to test before trying in an actual thread.
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

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
Back
Top