title: SUMIF dynamically change summing column
body: <p>I am using SUMIFS and want the <em>sum_range</em> dynamically to change according to the name I have of a column.</p>
  
  <p>I have a table with about 100 columns. Say one of these columns is <code>Paid_BC_items</code>. I want a formula that looks for which column <code>Paid_BC_items</code> is in and somehow insert that into the SUMIF here where the <code>Sheet4!J:J</code> part is. I have a few other criteria here too which are fixed so they don't need to be dynamic.</p>
  
  <pre><code>=SUMIFS(Sheet4!J:J,Sheet4!$C:$C,Sheet2!$D$3,Sheet4!$E:$E, Sheet2!$C6, Sheet4!$G:$G, Sheet2!$D6)
  </code></pre>
  
  <p>If for example I changed the column heading to something else I want the SUMIF then to look for that column in the big tables and return that.</p>
  
  <p>I know it has something to do with indexing, matching and indirects but I just can't figure it out right now.</p>
  
  <pre>
  Year    Week    Total Orders    Paid_BC_items   Free_BC_items
  2014    1   971     147 104
  2014    2   1565    339 213
  2014    3   1289    391 209
  2014    4   1171    389 228
  2014    5   1163    375 240
  2014    6   1298    405 330
  2014    7   1233    404 292
  </pre>