Reputation: 1749
I'm trying to sum all the values for the items defined in the NameRange
, using SUMIF
: =SUMIF(E1:E10,D1:D10,NamedRange)
So I would expect to have 1+3+7+8+10 =
29
, basically all in yellow.
But my result is 0. What do I do wrong?
Here is an editable example
Upvotes: 2
Views: 1976
Reputation: 18707
Try this:
=ArrayFormula(SUMIF(G2:G11;NamedRange;H2:H11))
The result is auto-axpanded row with sums by named range elements "A, B, C, D".
Next step is to use sum:
=sum(ArrayFormula(SUMIF(G2:G11;NamedRange;H2:H11)))
Upvotes: 2
Reputation: 27262
That's not gonna work I'm afraid. But see if this does:
=sumproduct(regexmatch(D1:D10, join("|", NamedRange)), E1:E10)
Upvotes: 1