SOLVED

Sumproduct for Dynamic ranges

Copper Contributor
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.
3 Replies
It appears the file did not upload?
best response confirmed by SubhasisB (Copper Contributor)
Solution

@SubhasisB 

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)))

image.png

@JMB17 Please find attached the file.

1 best response

Accepted Solutions
best response confirmed by SubhasisB (Copper Contributor)
Solution

@SubhasisB 

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)))

image.png

View solution in original post