Mindaugas Bernatavičius
Mindaugas Bernatavičius

Reputation: 3909

Want to sum the contents of one row based on the matching contents of another (don't know if SUMIF applies)

This is the desired result of the operation

This is the desired result of the operation

So the function should sum all the B values for all matching A values.

Upvotes: 0

Views: 983

Answers (1)

Joe
Joe

Reputation: 63424

Entered into C1 and then expanded to C1:C4 :

=IF(A1<>A2,SUMIF(A:A,A1,B:B),"")

The IF checks to see if the next row is different, then if so, it uses SUMIF. If your data isn't sorted, you can do a slightly more complicated check to see if there are no more values of A1 below it (using COUNTIF).

Upvotes: 2

Related Questions