EXCEL COUNT YES PLUS ONE CONDITION

Unlucky

Board Regular
Joined
Dec 3, 2014
Messages
58
Office Version
  1. 2016
Platform
  1. Windows
I have two columns, AR (Program Name) and BA (Yes or No), and I want to count the number of 'Yes' responses based on the program name. I've tried COUNT, COUNTA, COUNTIF, COUNTIFS, SUM, SUMIF, SUMIFS, SUMPRODUCT without success. I get returns of 0, all the Yes', and #VALUE. I've been trying to figure this out for over five hours, and Google keeps steering me to =COUNT(A1:A6,"Yes")! Here is the basic formula:

=COUNT('RAW DATA'!$BA$8:$BA$1507,"Yes",'RAW DATA'!$AR$8:$AR$1508=C$102)

The C$102 criteria references the program name.

And yes, I have tried the search parameters in reverse order (AR before BA).

Any help is enormously appreciated!

I really am Unlucky
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Your array sizes are different (1507 vs 1508). That will throw an error. Also, Count doesn't work like that.

MrExcelPlayground4.xlsx
ARASATAUAVAWAXAYAZBA
1Program NameY/N
2AA3Yes
3BB1No
4CC2Yes
5AD1Yes
6BE0No
7CYes
8DNo
9ENo
10AYes
11BYes
12DYes
13BNo
14CNo
Sheet30
Cell Formulas
RangeFormula
AU2:AU6AU2=COUNTIFS($AR$2:$AR$14,AT2,$BA$2:$BA$14,"Yes")
 
Upvote 0
JamesCanale

Amazing! I feel so stupid, . . . . . and unlucky. That was such a simple fix, that I can't believe I missed it. Ugh!

I genuinely appreciate your help. Thank you. Thank you. Thank you.
 
Upvote 0
Unfortunately, I have another puzzle that I can't solve.

Similar to the above issue, I have the 'Program' name in column AR, and associated / affected programs in columns BC:BO. I want to count the number of associated times when a program name is located in column AR, and an affected program is identified in columns BC:BO. For now, column AR entries have an actual name, whereas columns BC:BO have a '1'. Should I change columns BC:BO to a name, or use 'Yes' to make the calculations easier? The current formula is:

=COUNTIFS('RAW DATA'!$AR$8:$AR$1507,AY$38,'RAW DATA'!$BA$8:$BA$1507,$BD$37)

AY$38 is a program name (ABC) that changes, and $BD$37 is a program name (QMF) that doesn't change; AY$38:BK$38 have different program names, with the idea to count correlated occurrences.
 
Upvote 0
I can't gather your question. Any chance you can put up some sample data and the output your looking for?
 
Upvote 0
LOG_BAE_(06085)_OPEN-CARs_REVISED_DRAFT_2021-11-04.xlsx
ARAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBP
6PROGRAMFOUND DURINGAUDIT CHARsREPEAT DEFECT?AFFECT OTHER PROGRAMS?AFFECTED PROGRAMS
7PEPRAAVACVAMPVBFVM88PIM-CATPIM-PIMPFCSM109A5M109A6Con Bus SysFacilityQMSTOTAL
8AAVYesNo75YesNo112
9ACVYesNo22YesYes1113
10AAVYesNo38YesNo112
11BFVNoYes18NoNo 
12M88YesNo22NoNo 
13PIM-CATYesNo39YesYes11
14PIM-PIMYesNo51NoNo11
15PFCSYesNo74YesYes112
16PFCSYesNo35NoNo 
17M109A5YesNo60NoNo 
18AAVYesNo26YesNo11
19M109A6YesNo28NoNo11
20Con Bus SysNoYes22YesYes11
21FacilityNoYes35YesYes11
22FacilityYesNo64NoNo11
23AMPVYesNo31NoNo11
24M88YesNo44YesYes11
25FacilityYesNo41NoNo11
26QMSNoYes53YesYes11
27QMSYesNo24NoNo112
28QMSYesNo21YesYes11
RAW DATA
Cell Formulas
RangeFormula
BC7BC7='DROP DOWNS'!F6
BD7BD7='DROP DOWNS'!F7
BE7BE7='DROP DOWNS'!F8
BF7BF7='DROP DOWNS'!F9
BG7BG7='DROP DOWNS'!F10
BH7BH7='DROP DOWNS'!F11
BI7BI7='DROP DOWNS'!F12
BJ7BJ7='DROP DOWNS'!F13
BK7BK7='DROP DOWNS'!F14
BL7BL7='DROP DOWNS'!F15
BM7BM7='DROP DOWNS'!F16
BN7BN7='DROP DOWNS'!F17
BO7BO7='DROP DOWNS'!F18
BP8:BP28BP8=SUM(BC8:BO8)
Cells with Data Validation
CellAllowCriteria
AR8:AR1507List='DROP DOWNS'!$F$5:$F$20
AX8:AY28List='DROP DOWNS'!$J$5:$J$8
BA8:BB28List='DROP DOWNS'!$J$5:$J$8
 
Upvote 0
LOG_BAE_(06085)_OPEN-CARs_REVISED_DRAFT_2021-11-04.xlsx
AXAYAZBABBBCBDBEBFBGBHBIBJBKBL
35PROGRAM CORRECTIVE ACTION REQUESTS BY REPEAT OBSERVED NON-CONFORMANCES
36
37TOTAL CARs WRITTEN AGAINSTAAVTHAT AFFECT OTHER PROGRAMSREPEAT PERCENTAGE0.00%
38CAR STATUS METRICSAAVACVAMPVBFVM88PIM-CATPIM-PIMPFCSM109A5M109A6Con Bus SysFacilityQMSTOTAL
3900000000000000
400.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%
PROGRAM
Cell Formulas
RangeFormula
BD37,AY38BD37='DROP DOWNS'!$F$6
BL37BL37=($BL$39)/($BL$10)
AZ38AZ38='DROP DOWNS'!$F$7
BA38BA38='DROP DOWNS'!$F$8
BB38BB38='DROP DOWNS'!$F$9
BC38BC38='DROP DOWNS'!$F$10
BD38BD38='DROP DOWNS'!$F$11
BE38BE38='DROP DOWNS'!$F$12
BF38BF38='DROP DOWNS'!$F$13
BG38BG38='DROP DOWNS'!$F$14
BH38BH38='DROP DOWNS'!$F$15
BI38BI38='DROP DOWNS'!$F$16
BJ38BJ38='DROP DOWNS'!$F$17
BK38BK38='DROP DOWNS'!$F$18
AY39:BA39AY39=COUNTIFS('RAW DATA'!$AR$8:$AR$1507,AY$38,'RAW DATA'!$BC$8:$BC$1507,$BD$37)
BB39:BK39BB39=COUNTIFS('RAW DATA'!$AR$8:$AR$1507,BB$38,'RAW DATA'!$BA$8:$BA$1507,">0")
BL39:BL40BL39=SUM(AY39:BK39)
AY40:BK40AY40=IF(AY39="","",AY39/$P$69)



Subsequent tables will be made, and cell BD37 would change to reflect the next program to determine association.
 
Upvote 0
Not at all sure this is right:
MrExcelPlayground4.xlsx
ARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBP
6PROGRAMFOUND DURINGAUDIT CHARsREPEAT DEFECT?AFFECT OTHER PROGRAMS?AFFECTED PROGRAMS
7PEPRAAVACVAMPVBFVM88PIM-CATPIM-PIMPFCSM109A5M109A6Con Bus SysFacilityQMSTOTAL
8AAVYesNo75YesNo112
9ACVYesNo22YesYes1113
10AAVYesNo38YesNo112
11BFVNoYes18NoNo0
12M88YesNo22NoNo0
13PIM-CATYesNo39YesYes11
14PIM-PIMYesNo51NoNo11
15PFCSYesNo74YesYes112
16PFCSYesNo35NoNo0
17M109A5YesNo60NoNo0
18AAVYesNo26YesNo11
19M109A6YesNo28NoNo11
20Con Bus SysNoYes22YesYes11
21FacilityNoYes35YesYes11
22FacilityYesNo64NoNo11
23AMPVYesNo31NoNo11
24M88YesNo44YesYes11
25FacilityYesNo41NoNo11
26QMSNoYes53YesYes11
27QMSYesNo24NoNo112
28QMSYesNo21YesYes11
29
30
31
32
33
34
35
36
37AAV
38AAVACVAMPVBFVM88PIM-CATPIM-PIMPFCSM109A5M109A6Con Bus SysFacilityQMSTOTAL
39This 03002000000005
40Or03002000000005
Sheet29 (2)
Cell Formulas
RangeFormula
BP8:BP28,BL39:BL40BP8=SUM(BC8:BO8)
AY39:BK39AY39=SUMPRODUCT(--($AR$8:$AR$28=$BD$37),BC8:BC28)
AY40:BK40AY40=COUNTIFS($AR$8:$AR$28,$BD$37,BC8:BC28,1)
 
Upvote 0
Solution
Awesome! I used the COUNTIF version.

Sorry for the delay in responding; I had already gone home for the night when you provided the answer.

Again, thank you very much!
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,123
Members
452,546
Latest member
Rafafa

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