Google-sheets – Sum data based on dates

formulasgoogle sheets

I have a Google Sheet of data like this:

4/1/17 | 5
4/1/17 | 7
4/1/17 | 22
4/2/17 | 5
4/2/17 | 10
4/3/17 | 5
4/3/17 | 23
4/3/17 | 1
4/3/17 | 5
4/3/17 | 17
4/3/17 | 3

And I want some sort of formula that I can apply to this range to return this:

4/1/17 | 34
4/2/17 | 15
4/3/17 | 54

(Obviously any date can have any number of entries and it needs to be expandable so that another date can be added – e.g. 4/4/17 – and the "result range" will automatically populate a new row)

Any suggestions?

Best Answer

If your data is in ColumnsA:B then your first date in say D1 and in E1:

=sumif(A:A,D1,B:B)

is not fully automatic (you would have to drag D1:E1 down to suit) but should give the desired output. Provided dragged far enough further data added to B:C should update D:E.