Reputation: 1636
I am trying to add values from column C (Number) based on criteria from columns A (Name) and B (Date).
Name(A) Date(B) Number(C) Total by Name by Date (D)
Allen 5-6-14 12.75
Allen 5-6-14 2.88
Allen 5-12-14 1200.75
Doug 3-2-14 1111.11
Doug 3-2-14 2222.22
Doug 5-6-14 99.99
Greg 8-1-14 555.55
Steve 8-1-14 11.99
Zoe 8-1-14 77.33
Zoe 8-1-14 33.78
In column D I am looking to add up the number based on the name and date. For example,
Allen 5-6-14 15.63
Allen 5-12-14 1200.75
Doug 3-2-14 3333.33
Doug 5-6-14 99.99
Greg 8-1-14 555.55
Steve 8-1-14 11.99
Zoe 8-1-14 111.11
I started off with this:
=SUMIF(A:A, "Allen", C:C)
which will give me the value of 1216.38 (all of the dates added up for Allen). Now what I need to do is add another criteria to check if the dates (column B). I know this can be done using a pivot table, found here (Formula for monthly sum by person) but I am curious on if there is another way to do this.
Any help on this would be much appreciated.
Upvotes: 0
Views: 130
Reputation: 1636
Wow just figured it out. Sorry to waste anyone's time.
Using SUMIFS...
=SUMIFS(C:C,A:A, "Allen", B:B, "5/6/2014")
Upvotes: 2
Reputation: 46401
Look at SUMIFS
function, that allows you to use multiple criteria, e.g.
=SUMIFS(C:C,A:A,"Allen",B:B,DATE(2014,5,6))
or you can use cell refs as criteria and copy formula down, e.g.
=SUMIFS(C:C,A:A,J2,B:B,K2)
where J2 is a specific name and K2 a specific date
Note that with SUMIFS the range to sum is shown first
Upvotes: 1