title: Google sheet: SUMIF with relative (not fixed) sum range?
body: <p>I have my data organised in a NxN table with coupled columns {quantity,code} (see image below).</p>
  <p>I'm looking for a function able to calculate total quantity by code.</p>
  <p>I've tried with <a href="https://support.google.com/docs/answer/3093583?hl=en" rel="nofollow noreferrer">SUMIF</a>, but it seems to work only with a fixed sum range, whilst I need a RELATIVE sum range.</p>
  <p>Can you address me to the right solution?</p>
  <p><a href="https://i.stack.imgur.com/gVWHu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gVWHu.png" alt="enter image description here" /></a></p>