title: SUMIF, INDEX, MATCH Multiple Columns and Rows
body: <p>I'm working on some non-profit work and can't figure out how to sum a table based on two criteria:</p>
  
  <ol>
  <li>Is it donated (Column)</li>
  <li>Is it in the DR (Row)</li>
  </ol>
  
  <p>Here is a simplified version of my table:</p>
  
  <p><a href="https://i.stack.imgur.com/2e0gv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2e0gv.png" alt="enter image description here"></a></p>
  
  <p>The equation I'm using so far is: </p>
  
  <pre><code>=sumif(A2:A6,B11,index(B2:F6,0,match(C10,B1:F1,0)))
  </code></pre>
  
  <p>The MATCH function only finds the first row with DR and sums everything. Is there a way to take it one step further to sum all of the columns and rows?</p>
  
  <p>I'm also using Google Sheets and not Excel.</p>
  
  <p>I would greatly appreciate any help, as I've been stuck on this forever.</p>
  
  <p>Thanks</p>