COUNT 'YES' BY MONTH & YEAR WITH ANOTHER CONDITION

Unlucky

Board Regular
Joined
Dec 3, 2014
Messages
58
Office Version
  1. 2016
Platform
  1. Windows
Trying to count the number of 'Yes' entries by month and by a program. Raw information is contained in columns M23:R47

Column M23:M47 contains the program name
Column N23:N47 contains the entry dates
Column O23:O47 contains the 'Yes' and 'No' entries (Primary)

Column P23:P47 contains the 'Yes' and 'No' entries (Alternate - ignore for the purposes of the post)
Column Q23:Q47 contains a workcenter identification (ignore for the purposes of the post)
Column R23:R47 contains an employee identification (ignore for the purposes of this post)

I am currently using the formula =COUNTIFS($M$23:$M$47,"="&$M4,$N$23:$N$47,"="&O$3,$O$23:$O$47,"=Yes") . . . but only some cells report to the table.

The report table is columns M3:Z19

Column M3:M19 contain the program names
Row N3:Y3 contain the month & year
Cells N4:Y17 contain the formula

Column Z4:Z18 are totals of the cell rows, the same as ROW N18:Y18

PROBLEM: Only some of the data is reporting in the cells using the formula =COUNTIFS($M$23:$M$47,"="&$M4,$N$23:$N$47,"="&O$3,$O$23:$O$47,"=Yes")

Tried to upload a sectioned copy of the spreadsheet but can't figure it out.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
TEST LOG FOR FORMULAS.xlsx
MNOPQRSTUVWXYZ
2PE METHOD
3PROGRAMJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21TOTAL
4A0000000000000
5B0000000000000
6C0000000000000
7D0000000000000
8E0000000000000
9F0000000000000
10G0000000000000
11H0100000000001
12I0000000000000
13J0000000000000
14K0000000000000
15L0000000010001
16M0000000000000
17N0000000000000
18TOTAL0100000010002
19PERCENTAGE0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%0.00%
20
21PROGRAMDATEMETHODWORKCENTEROPERATORCOUNT PE METHOD BY MONTH, BY PROGRAM
22PEPR
23A7-Jan-2021YesNo142571
24A12-Jan-2021YesNo124528
25D31-Jan-2021YesNo121448
26G6-Feb-2021NoYes121542
27H22-Feb-2021YesNo77201
28N4-Mar-2021YesNo142571
29N18-Mar-2021NoNo51542
30M12-Apr-2021NoNo221448
31F1-May-2021NoNo177201
32G3-May-2021YesNo172571
33B7-May-2021NoYes172571
34B19-May-2021YesNo141448
35K6-Jun-2021YesNo123309
36A4-Jul-2021YesNo22571
37A21-Jul-2021YesNo73309
38B21-Aug-2021YesNo71448
39C23-Aug-2021YesNo77201
40L22-Sep-2021YesNo87205
41J24-Sep-2021YesNo21448
42J29-Sep-2021NoYes143302
43N30-Oct-2021NoYes121448
44M11-Nov-2021YesNo122571
45K27-Nov-2021NoYes171542
46A7-Dec-2021YesNo81888
47C25-Dec-2021NoYes21369
FORMULA TEST
Cell Formulas
RangeFormula
M3,M21M3='C:\Users\BGD1558\OneDrive - Defense Information Systems Agency\Documents\BAE SYSTEMS (06085)\CORRECTIVE ACTION PLANS\[LOG_BAE_(06085)_OPEN-CARs_REVISED_DRAFT_2021-11-04.xlsx]DROP DOWNS'!$F$4
N4:Y17N4=COUNTIFS($M$23:$M$47,"="&$M4,$N$23:$N$47,"="&N$3,$O$23:$O$47,"=Yes")
Z4:Z17Z4=SUM(N4:Y4)
N18:Z18N18=SUM(N4:N17)
N19:Y19N19=IF(ISERROR(N18/$P$23),0,N18/$P$23)
 
Upvote 0
How about
Excel Formula:
=COUNTIFS($M$23:$M$47,$M4,$N$23:$N$47,">="&EOMONTH(N$3,-1)+1,$N$23:$N$47,"<"&EOMONTH(N$3,0)+1,$O$23:$O$47,"=Yes")
 
Upvote 0
Solution
Thank you. That seems to work just right. I genuinely appreciate your help.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,185
Members
449,071
Latest member
cdnMech

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