Sum row in Excel/Google Sheets based on Condition
<p>It seems like this question should exist somewhere, but I can't seem to find it...exactly.</p>

<p>The most similar solution I can find requires the use of <code>SUMIFS</code> or <code>SUMIF</code>, which only seems to add up numbers in a column, not spanning multiple columns. Here's an example sheet with 2 rows:</p>

<pre><code>      A             B    C    D    E    F    G    H  ...
1     2015-01-01    0    1    6   12   45   12    5  ...
2     2016-01-01    256 43   13   35  134  135   12  ...
</code></pre>

<p>Now I'd like to have a cell somewhere that adds all of the cells in the row for <code>2015-01-01</code>. My attempt looks like:</p>

<p><code>SUMIF(A1:A30,"2015-01-01", B1:BJ30)</code></p>

<p>But this only yields the sum of the column B, so <code>0</code> for the exact formula above or <code>256</code> if I were to do this for the year <code>2016</code>.</p>

<p>When trying something with <code>SUMIFS</code>, I'm told that the criterion range's size should match the sum range size, which isn't the case because my criterion range is only the first column of dates.</p>

<p>How can I add all the values in a row if the first cell's date matches my criterion? It may be worthwhile to note that this is in Google Sheets, not Excel. </p>