title: Comparing dates in Excel and adding a set of cells
body: <p>I am trying to compare a series of cells in a column to match a particular month and if it matches, I want to add the value from a particular cell. </p>
  
  <p>For example, If the month value in A1 to A50 is December, I want to add C1 to C50. If anything in between A1 to A50 is not December, then it would add 0 for that particular cell. </p>
  
  <p>I was able to implement it by using sum, if and month commands. But, I was not able to use arrays to check the month, which is making the formula complicated and huge for a large number of cells. </p>
  
  <p>Is it possible to use an array to implement this. </p>
  
  <pre><code>=sum(if(month(A1)=9, C1, 0),if(month(A2)=9, C2, 0))
  </code></pre>