Sumproduct with indirect on a dynamic range?

bakubaku

New Member
Joined
Oct 18, 2010
Messages
16
Hello All,

I have the name of a dynamic range (D_Conv3) in one cell (A7)
the formula for the range is as follows :OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1)
the range contains only numbers

I'm trying to find a sumproduct formula which would fetch and use that range name

So the natural way for me to go would be to build something like:
=SUMPRODUCT((INDIRECT(A7))
but since i'm only getting a #REF error with this method, I'm guessing the SUMPRODUCT won't work as long as you're mixing it with the INDIRECT on a dynamic range

is there a way to bypass the problem?
either with the sumproduct or by using something else?

thanks in advance
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
That will work, the error is in the defention of the range

:OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1) is a text string, not a formula,

It should be

=OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1)

If that's not giving the range you're looking for, what should the correct range be?
 
Upvote 0
sorry, there's no error, I miscopied it when writing the post,but the range definition in my file is indeed
=OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1)

and it's still giving me the #REF
 
Upvote 0
What is in N1:N6? Are any of those cells merged?

What is in the rest of column N?
 
Upvote 0
That will work, the error is in the defention of the range

:OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1) is a text string, not a formula,

It should be

=OFFSET(Data!$N$7;0;0;COUNTA(Data!$N:$N)-5;1)

If that's not giving the range you're looking for, what should the correct range be?
INDIRECT will not work when the dynamic named range is defined using functions like OFFSET.
 
Upvote 0
Perfect!
It does exactly the trick
thanks a lot!
Good deal. Thanks for the feedback!

Just a note...

I'm guessing that the "final" formula will be more complicated than:

=SUMPRODUCT(CHOOSE(MATCH(A7,Data!L$5:S$5,0),D_Conv1,D_Conv2,D_Conv3,D_Conv4))

Which is simply performing a SUM on the named range. If an unconditional sum is all that you want to do then you can use the SUM function:

=SUM(CHOOSE(MATCH(A7,Data!L$5:S$5,0),D_Conv1,D_Conv2,D_Conv3,D_Conv4))
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,683
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top