title: using index match with sum if
body: <p>I need to link up a sumif() with an index match (i'm guessing here) but don't really know where to start.</p>
  
  <p>Basically i a table with different classes of pets, their species and quantity. there are 3 stores. I need an output where i can get the quantity of each species from each store dynamically. </p>
  
  <p>data table:</p>
  
  <pre><code>"A1"                Pet Stores      
  Species  Class      a   b   c
  cat      Fluffy1    1   0   0
  cat      Fluffy2    3   0   0
  cat      Fluffy3    5   7   1
  cat      Fluffy4    6   0   7
  dog      Barky1     7   6   9
  dog      Barky2     1   3   9
  dog      Barky3     0   2   8
  dog      Barky4     0   2   3
  fish     Swimmy1    0   0   0
  fish     Swimmy2    1   3   0
  fish     Swimmy3    0   2   3
  fish     Swimmy4    0   0   0
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Pet Store   a   &lt;--change this
  cat         15  &lt;--output
  dog         8   &lt;--output
  fish        1   &lt;--output
  </code></pre>
  
  <p>right now my formula for "cat" is <code>=SUMIF($A$3:$A$14,A17,$C$3:$C$14)</code>. however, it only looks down the 1 column that i've set. how do i change it such that it searches for the "Pet Store" and returns sum of the respective column?</p>