My problem is depicted in this picture:
I want to sum up all ones of Alice, Bob and Carol – but I don’t know how to do this without a macro. Is it even possible to do this with a simple Excel formula (such as, e.g., =SUMIF()
) so that the result is
?
You can use SUMPRODUCT
to sum a range based on criteria like this:
=SUMPRODUCT(--(B2:G8)*(A2:A8="Alice"))
(A2:A8="Alice")
will return 1
or 0
based on whether the criteria isTrue
or False
. Then, when multiplied by the range (B2:G8)
only the values which meet the criteria will be returned.