Using dynamic range names in SUMPRODUCT.

Philem

Active Member
Joined
Jan 2, 2003
Messages
282
Hullo. Have an issue here that I can't seem to wrap my blonde head around: In a worksheet, I'd like to set up several dynamic ranges, and use those ranges in a SUMPRODUCT formula. I know that I am setting up the dynamic ranges correctly, because I can get simpler functions (SUM, COUNTIF, and so on) to work, but when I use the SAME names in a SUMPRODUCT, I always get #VALUE.

Any suggestions appreciated. If specifics are needed, just ask!

Thanks!

P
 
Re: SOLVED!

Philem said:
Aladin Akyurek said:
<SNIP>

I interpret your original formula to mean:

If there is a value in DynRange1, then sum the corresponding value in DynRange2. If this is what you intend to do, a SumIf formula would suffice...

=SUMIF(DynRange1,"<>",DynRange2)

Does this give the required answer?

It does indeed. Many thanks! :wink:

P

Just to check, try also..

=SUMPRODUCT((DynRange1<>"")+0,DynRange2)

Does it work too?
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Re: SOLVED!

Aladin Akyurek said:
<SNIP>
Just to check, try also..

=SUMPRODUCT((DynRange1<>"")+0,DynRange2)

Does it work too?

No, that does not work, and, would not be desired, as DynRange1 *will* have a number in it; either a zero, in which case, we ignore it, or a positive value, in which case, we use it.

Thank you for your assistance.

P
 
Upvote 0
Re: SOLVED!

Philem said:
Aladin Akyurek said:
<SNIP>
Just to check, try also..

=SUMPRODUCT((DynRange1<>"")+0,DynRange2)

Does it work too?

No, that does not work, and, would not be desired, as DynRange1 *will* have a number in it; either a zero, in which case, we ignore it, or a positive value, in which case, we use it.

Thank you for your assistance.

P

Not that you should use this for a single condition summing, try...

=SUMPRODUCT((DynRange1>0)+0,DynRange2)
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,108
Members
452,302
Latest member
TaMere

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