Counting multiple criteria in one column

datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
I am trying to write a statement that essentially says if cells N14-N19 = either Y or NA count it as Y.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
One way:
Code:
=COUNTIF(N14:N19,"Y")+COUNTIF(N14:N19,"NA")
 
Upvote 0
Something like that



=IF(OR(COUNTIF(N14:N19,"Y")=6,COUNTIF(N14:N19,"NA")=6),"Y")
 
Upvote 0
If I wanted to take it a step further and account for those same cells and then divide them by the total number of entries in the specified cells to return a percentage what might that look like?
 
Upvote 0
Do you mean something like this?

Code:
=(COUNTIF(N14:N19,"Y")+COUNTIF(N14:N19,"NA"))/COUNTA(N14:N19)
 
Upvote 0
If I wanted to take it a step further and account for those same cells and then divide them by the total number of entries in the specified cells to return a percentage what might that look like?

You can put examples 3 or more examples of what you have in the cells and the result you expect.
 
Upvote 0
So heres what I have so far,
=COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"Y")+COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"NA")/COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019")
This is returning 250% rather than 83% there's 2 Y responses and 3 NA's and 1 N.
 
Upvote 0
Mathematical order of operations usually does multiplication and division before addition and subtraction. So you need parentheses around your first two COUNTIFS:
Code:
[COLOR=#333333]=[/COLOR][COLOR=#ff0000][B]([/B][/COLOR][COLOR=#333333]COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"Y")+COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"NA")[/COLOR][COLOR=#ff0000][B])[/B][/COLOR][COLOR=#333333]/COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019")[/COLOR]
 
Last edited:
Upvote 0
So heres what I have so far,
=COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"Y")+COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019",ATRMC!N:N,"NA")/COUNTIFS(ATRMC!$C:$C,">4/30/2019",ATRMC!$C:$C,"<6/1/2019")
This is returning 250% rather than 83% there's 2 Y responses and 3 NA's and 1 N.

Sorry, but I did not understand your examples I do not see the values ​​in the cells nor do I understand the dates.

[TABLE="class: grid, width: 210"]
<colgroup><col span="14"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD] 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] 2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD] 3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD] 4[/TD]
[TD] [/TD]
[TD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TD] [/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD] 11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD] 12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD] 13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD] 14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]N[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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