Excel Formula to COUNTIFS date falls in particular month AND second criteria is "x"
<p>I have excel data in following format.</p>

<pre><code> Date   In Stock
2/02/16     x
5/02/16     
18/02/16    x
22/02/16    x
14/03/16    
16/03/16    
21/03/16    x
28/03/16    x
1/04/16     
7/04/16     
9/04/16     
8/04/16     x
</code></pre>

<p>I want to apply a formula for reporting purposes in column E. For each month, tally the total number of 'x'. </p>

<pre><code>{COL D}     {COL E}                             {COL F}
Month       Number of Products In Stock         Expected Result
Feb-16                                          3
Mar-16                                          2
Apr-16                                          1
</code></pre>

<p>Example: For February 2016, I am expecting to see a value of '3' in cell E4.</p>

<p>The formula I have created below doesn't work. The first criteria is using the month function and I am looking for '2' (being February) as the value. The second criteria looks at Column B and the value 'x'. </p>

<pre><code>=COUNTIFS(month(A4:A19),2,B4:B19,"x")
</code></pre>

<p>Any assistance greatly appreciated. </p>