SUMPRODUCT multiple criteria on named ranges

ron2k

Board Regular
Joined
Jan 28, 2008
Messages
139
Hi guys,

Say, I have three named ranges (no header rows):
bze2011 = A1:N1250
czl2011 = A1260:N2569
bmp2011 = A2580:N4976

Column A contain, say, product codes - T521,T523,T568
Column N contain total sales for that product.

On say another worksheet:
A1=T521
A2=T523
A3=T568

On B1, I'd like the sumproduct of A1:A3, on Column N of named range bze2011 where products listed on A1:A3 are found on column A of that range (A1:A1250).

I don't want to use:
Code:
=IF(ISNA(VLOOKUP(A1,bze2011,13,FALSE)),0,VLOOKUP(A1,bze2011,13,FALSE))+IF(ISNA(VLOOKUP(A2,bze2011,13,FALSE)),0,VLOOKUP(A2,bze2011,13,FALSE))+IF(ISNA(VLOOKUP(A3,bze2011,13,FALSE)),0,VLOOKUP(A3,bze2011,13,FALSE))
Is there a way?

EDIT: Note that I'm gonna put the sumproduct formula on another workbook, so offset and such may not work.

Thanks
 
Last edited:

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hmn,

I've given this a try, but it's working guys I get #VALUE! error.
Code:
=SUMPRODUCT(--ISNUMBER(MATCH(A1:A3,INDEX('TB Branches - Yearly.xls'!bze2011,,1),0)),INDEX('TB Branches - Yearly.xls'!bze2011,,14))

I guess, I'll have to start consider the vlookup formula.
 
Upvote 0
Hi,

Maybe this

As bze2011 is a cell-address in Excel 2010, i changed the name to MyRange

=SUMPRODUCT(--(((MyRange=A1)+(MyRange=A2)+(MyRange=A3))>0),OFFSET(MyRange,0,13))

HTH

M.
 
Upvote 0
I haven't tried this, but not quite sure I want to try it. Thanks though, the reason for the hesitation is because OFFSET doesn't work on closed workbooks.

Any other suggestion?

Ron

EDIT: I tried it and it gives a #NAME? error
 
Last edited:
Upvote 0
Ron,

I didnt know you are working with 2 different workbooks.

In your OP you wrote
"On say another worksheet:
A1=T521
A2=T523
A3=T568"

I have to rethink

You got an error #NAME... Excel 2003?

M.
 
Upvote 0
Both workbooks are saved as 2003; but I work on xl07.

Other types of arrays may work, but I'm not that versed in that type of formulas.

Thanks,
 
Upvote 0
Hello, Try

=SUMPRODUCT(--ISNUMBER(MATCH(INDEX(bze2011,,1),A1:A3,0)),INDEX(bze2011,,14))

EDIT: If your workbook is on XL07 bze2011 is a valid cell reference.
 
Last edited:
Upvote 0
Hey that made it, thank you Haseeb, that almost looks like the shot I took when I wrote the formula on post #2 above.

Thanks a mil,

Ron
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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