COUNTIF for multiple critera, and for specifc months

gorillawar

New Member
Joined
Aug 1, 2018
Messages
19
Hello,

I am trying to count the number of word occurrences for a specific word within arange, but only if it matches a specific month.



[TABLE="width: 121"]
<tbody>[TR]
[TD="width: 79"]
05-Jan-18
[/TD]
[TD="width: 83"]
OPS
[/TD]
[/TR]
[TR]
[TD="width: 79"]
12-Jan-18
[/TD]
[TD="width: 83"]
OPS
[/TD]
[/TR]
[TR]
[TD="width: 79"]
19-Jan-18
[/TD]
[TD="width: 83"]
QA/OPS
[/TD]
[/TR]
[TR]
[TD="width: 79"]
26-Jan-18
[/TD]
[TD="width: 83"]
OPS
[/TD]
[/TR]
[TR]
[TD="width: 79"]
02-Feb-18
[/TD]
[TD="width: 83"]
OPS
[/TD]
[/TR]
[TR]
[TD="width: 79"]
16-Feb-18
[/TD]
[TD="width: 83"]
QA
[/TD]
[/TR]
[TR]
[TD="width: 79"]
23-Feb-18
[/TD]
[TD="width: 83"]
OPS
[/TD]
[/TR]
</tbody>[/TABLE]

I have tried =COUNTIF(B1:B7,"QA/OPS")+COUNTIF(B1:B7,"OPS")*(MONTH(A1:A7)=1)


It just returns a 1, instead of a 4, since there are 4occurrences of the word “OPS” within January

Any help is appreciated

Thanks,

 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
=SUMPRODUCT(ISNUMBER(SEARCH("OPS",B1:B7))*(MONTH(A1:A7)=1))
 
Upvote 0
Try this:

=SUMPRODUCT(--((B1:B7="OPS")+(B1:B7="QA/OPS")),--(MONTH(A1:A7)=1))

Note that if those are the only 2 options with OPS in them then Fluff's formula is better, but if you need to specifically isolate only those 2 item, then mine does that.
 
Last edited:
Upvote 0
Not sure which of us you are referring to, but glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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