Forum Discussion
SubhasisB
Dec 08, 2020Copper Contributor
Sumproduct for Dynamic ranges
Dear All, In the attached excel file there are two drop-down box, I want to have the sum total expenses in Q column based on the month selection by the user from drop-down box. Please Help.
- Dec 08, 2020
That could be
=SUM(XLOOKUP(O3,$C$2:$N$2,$C3:$N3):XLOOKUP(P3,$C$2:$N$2,$C3:$N3))or
=SUM(INDEX(C4:N4,MATCH(O4,$C$2:$N$2,0)):INDEX(C4:N4,MATCH(P4,$C$2:$N$2,0)))
SergeiBaklan
Dec 08, 2020Diamond Contributor
That could be
=SUM(XLOOKUP(O3,$C$2:$N$2,$C3:$N3):XLOOKUP(P3,$C$2:$N$2,$C3:$N3))
or
=SUM(INDEX(C4:N4,MATCH(O4,$C$2:$N$2,0)):INDEX(C4:N4,MATCH(P4,$C$2:$N$2,0)))