wtsabo

New Member
Joined
Mar 3, 2010
Messages
39
Hello,
I am trying to use named ranges to define a group of variables that will be used in a sumproduct, but I am return errors.

For example:

Sheet 1:
Name ranges
Apple = {1.000.1, 1.000.2, 1.000.3}
Banana = {2.000.1, 2.000.2, 2.000.3, 2.000}
Carrot = {3.000.1, 3.000.2, 3.000.3, c.0000}

Sheet 2:
DateValueGroup
01/02/201251.000.1
4/30/2012101.000.2
5/14/2012151.000.3
6/8/2012203.000.1

<tbody>
</tbody>


Sheet 3:
Reference Cell = Apple
Date Range = January 1, 2012 to May 31, 2012
Results Cell = Sumproduct(((Indirect(Apple)=(Sheet 2! Group Array))*(Sheet 2! Value Array)*(Date Array<June 1,2012))
Answer = 30

The error is created by the reference for the 'apple' named range. Can someone please assist?

Thank you
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
With the named constant (not range) Apple that refers to:

={"1.000.1","1.000.2","1.000.3"}

this formula will return the number of Apples in C2:C5:

=SUMPRODUCT(--ISNUMBER(MATCH(C2:C5,Apple,FALSE)))

Maybe you can expand the formula to suit.
 
Upvote 0
Do you mean expanding the formula for each constant?
Such as:
=sumproduct(isnumber(MATCH(C2:C5,Apple,FALSE)))*isnumber(MATCH(C2:C5,banana,FALSE)))*isnumber(MATCH(C2:C5,carrot,FALSE))--)

If so, this method is going to result in a very long/complex formula. It might be easier to adjust my data source just to create a group column using the known associations, but is there a better alternative?
 
Upvote 0
Do you mean expanding the formula for each constant?
Such as:
=sumproduct(isnumber(MATCH(C2:C5,Apple,FALSE)))*isnumber(MATCH(C2:C5,banana,FALSE)))*isnumber(MATCH(C2:C5,carrot,FALSE))--)

No just add the other criteria that you want to the formula, eg a date range.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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