title: Exclude blank/FALSE cells in in Excel array IF formula output
body: <p>I am having difficulties with making an array formula work the way I want it to work. </p>
  
  <p>Out of a column of dates which is not sorted, I want it to extract values into a new column. The formula below identifies the required cells of a given month and year, but they appear in their original row rather than on top of the output range. Moreover, I want all ""/FALSE cells to be excluded from the output array.</p>
  
  <pre><code>=IF((MONTH($I$15:$I$1346)=1)*(YEAR($I$15:$I$1346)=2008),$I$15:$I$1346,"")
  </code></pre>
  
  <p>In fact, the $I$15:$I$1346 should be dynamic and go to the last filled range (I could make a named range for that)</p>
  
  <p>Part two is to expand on that formula so that it calculates the data that is an two column offset of the data described above.</p>
  
  <p>Is the above possible to build into one cell probably with a combination of IF, INDEX, SMALL and maybe others?</p>
  
  <p>I'm not looking for a filter solution. Hope the above is clear enough and that you can help!</p>
  
  <p>Here's a shortened sample layout:</p>
  
  <pre><code>    A           B          C
  1   Date        Series_A   Series_B
  2   03/01/2011  45         20
  3   04/01/2011  73         30
  4   06/01/2011  95         40
  5   08/01/2011  72         50
  6   06/02/2011  5          13
  7   09/02/2011  12         #N/A
  8   05/02/2011  23         65
  9   07/03/2011  12         65
  </code></pre>
  
  <p>Then I want three input cells for the year and and the month and series name (index/match, as there are many more columns with data). If it would be 2011, Feb and Series_A, I want it to calculate the average for that month. In this case it would be (5+12+23)/3. If it would be Feb-2011 and Series_B instead, which has an error, it should show (13+65)/2 rather than an error. </p>
  
  <p>Aside from that I want a separate which will output an array with the data instead without 'holes' in between and with the right 'length'. Example for Feb-2011 in Column C:</p>
  
  <pre><code>    A           B          C                  D
  1   Date        Series_A   Desired Output     Output based on f above
  2   03/01/2011  45         5                  
  3   04/01/2011  73         12
  4   06/01/2011  95         23
  5   08/01/2011  72         
  6   06/02/2011  5                             5
  7   09/02/2011  12                            12
  8   05/02/2011  23                            23
  9   07/03/2011  12  
  </code></pre>
  
  <p>If I then run a =ISBLANK(C5) it should be true, rather than =""=C5</p>
  
  <p>Hope the edit clarifies  </p>