title: SUMIFS: How to write column names as formula while specifying a range?
body: <p>There are columns B through Z in the table. I want to sum the column that contains "Mar-15" as the heading, provided column A's value is greater than or equal to "Mar-15".</p>
  
  <p>So, if I have the following in Sheet1 -</p>
  
  <pre><code>     A       B       C       D       E
  1          Mar-15   Apr-15  May-15  Jun-15
  2 Feb-15    1       2       3       4
  3 Mar-15    100     200     300     400
  4 Apr-15    1000    2000    3000    4000
  5 May-15    10000   20000   30000   40000
  </code></pre>
  
  <p>And I have the following in columns Y and Z -</p>
  
  <pre><code>    Y       Z
  1 Month    Value
  2 Mar-15    ?
  </code></pre>
  
  <p>I want to be able to write a formula in Z2, that sums the values in the column which has the heading equal to Y2, and where column A is greater than or equal to Y2. So here, the required answer for the formula would be <strong>1110</strong> since Y2 contains <strong>Mar-15</strong>.</p>
  
  <p>To be clearer, if Y2 contains <strong>Apr-15</strong>, then the result in Z2 should be <strong>22000</strong></p>
  
  <p>Now, I have the formula</p>
  
  <pre><code>=MATCH(Y2,$1:$1,0)
  </code></pre>
  
  <p>which gives me 2, which is the column index in the first row, that matches with the value in Y2.</p>
  
  <p>Then, I modify it to get the address of the heading -</p>
  
  <pre><code>=ADDRESS(1,MATCH(Y2,$1:$1,0))
  </code></pre>
  
  <p>This gives me <strong>$B$1</strong>. To get the column alone, I am doing <code>=LEFT(ADDRESS(1,MATCH(Y2,$1:$1,0)),2)</code> which gives me <strong>$B</strong></p>
  
  <p>Now, I want to do a <code>SUMIFS</code> of the column returned by this address function, and specify the condition that column A should be greater than the value in Y2.</p>
  
  <pre><code>=SUMIFS(&lt;something&gt;,A:A,"&gt;="&amp;Y2)
  </code></pre>
  
  <p>What should <strong>something</strong> be? Depending on the value in Y2, the column which I want summed can be different. So what formula do I insert in place of <strong>something</strong>?</p>
  
  <p>I tried <code>LEFT(ADDRESS(1,MATCH(Y2,$1:$1,0)),2):LEFT(ADDRESS(1,MATCH(Y2,$1:$1,0)),2)</code> since <code>LEFT(ADDRESS(1,MATCH(Y2,$1:$1,0)),2)</code> gives me <strong>$B</strong> and I presumed this formula would give me <strong>$B:$B</strong>, but that doesn't work.</p>