Sumif with cell reference?

I have a sheet with daily data points. However there is no way to know how many data points exist for any particular day. I need to calculate the totals for each unique day.

I have come up with a simple solution, but it does not scale well.

Col A = datapoint date
Col B = datapoint value

Col C = individual days
Col D = totals for individual days

My solution for column D is to use SUMIF as follows…

=SUMIF(A$3:A$1000,"=09/23/2016",B$3:B$1000)

…but there is a big problem here in that the condition (AFAIK) can not be a reference. That means I have to manually enter the date into every SUMIF(), rather than, say, something like this…

=SUMIF(A$3:A$1000,"=C3",B$3:B$1000)

… where ‘C3’ would be a reference to a cell containing the date in question.

If I could do that, then it would be trivial to simply scale it up by copying the SUMIF() cell to a new range of cells. But without that ability I have to manually type in the date inside every SUMIF() cell. If I’ve got data for 500 days or more, manual entry is really not a practical solution.

OK I bit the bullet and finally taught myself about the better approach: pivot tables. It was actually much simpler than I expected, and certainly easier than my original sumif() solution.

+1 for the pivottables

If you want to use C3 as the reference cell then use the following formula

=SUMIF(A$3:A$1000,$C$3,B$3:B$1000)

The “=” is not required. If you wanted to specify a different condition you could use

=SUMIF(A$3:A$1000,"<>"&$C$3,B$3:B$1000)

Note they key difference from the formula in your question is the cell reference is not inside quotes.