Cant figure out COUNTIF formula for my range

gorillawar

New Member
Joined
Aug 1, 2018
Messages
19
I have some data that has the word "pass" or "fail" in one column, and a date in the one next to it. I am trying to use COUNTIF to count how many times a pass or fail occurred within each month.

I have tried both of the below formulas:

=COUNTIF(A1:A5,"Pass"),(MONTH(B1:B5)=F13) (F13 is just the number 1, so I can drag this formula down that has a 2 in F14 and so on)

=SUMPRODUCT((A1:A5="Pass"), (MONTH(B1:B5)=F13))

Neither of these seem to work, so I assume I am missing something. Any help is appreciated.

Thanks,
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You almost got it, try
=SUMPRODUCT((A1:A5="Pass")* (MONTH(B1:B5)=F13))
 
Last edited:
Upvote 0
Maybe something like this?

Excel Workbook
ABCDE
1ConditionDate
2Fail2/2/2018Start Date1/1/2019
3Pass2/3/2018End Date1/31/2019
4Pass2/4/2018Pass2
5Fail2/5/2018Fail2
6Pass1/1/2019
7Fail1/2/2019
8Fail1/5/2019
9Pass1/8/2019
Sheet1
 
Upvote 0
Wow..I cant believe it was just an asterisk and a space I was missing. I actually put an asterisk in there, but had no space lol. Thanks a million!
 
Upvote 0
You're welcome & thanks for the feedback.
You don't actually need the space, I simply didn't remove it from your formula.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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