SUMIF or SUMPRODUCT with multiple criteria across rows and columns

jbrouse

Active Member
Joined
Apr 28, 2005
Messages
329
I asked in a previous post (http://www.mrexcel.com/forum/showthread.php?t=569058) how to use SUMPRODUCT for criteria across rows and columns, and was told to do something like this instead:

=SUMIF('Sales Plan'!$D$2:$D$1876,'Sheet1'$D7,INDEX('Sales Plan'!$G$2:$R$1876,0,MATCH(AH$1,'Sales Plan'!$G$1:$R$1,0)))

which will sum values in the correct column for which 'Sales Plan!, Column D = Sheet1!D7

The problem is, I need more criteria.

I need 'Sales Plan'!$A$2:$A$1876 to be equal to something, and I need 'Sales Plan'!$A$2:$A$1876 to be equal to something. Both will have a static reference, let's say 'Sheet1'$A$1 and $A$2, respectively.

Can someone please help me out?

Thanks in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
'Sales Plan'!$A$2:$A$1876 should be equal to 'Sheet1'$A$1
'Sales Plan'!$B$2:$B$1876 should be equal to 'Sheet1'$A$2

Sorry. I'm typing faster than my brain is working.

Thanks!
 
Upvote 0
'Sales Plan'!$A$2:$A$1876 should be equal to 'Sheet1'$A$1
'Sales Plan'!$B$2:$B$1876 should be equal to 'Sheet1'$A$2

Sorry. I'm typing faster than my brain is working.

Thanks!

If you are on Excel 2007 or later...
Rich (BB code):
=SUMIFS(
   INDEX('Sales Plan'!$G$2:$R$1876,0,MATCH(AH$1,'Sales Plan'!$G$1:$R$1,0))),
   'Sales Plan'!$A$2:$A$1876,Sheet1!$A$1,
   'Sales Plan'!$B$2:$B$1876,Sheet1!$A$2,
   'Sales Plan'!$D$2:$D$1876,Sheet1!$D7)

Otherwise:
Rich (BB code):
=SUMPRODUCT(
    INDEX('Sales Plan'!$G$2:$R$1876,0,MATCH(AH$1,'Sales Plan'!$G$1:$R$1,0))),
    --('Sales Plan'!$A$2:$A$1876=Sheet1!$A$1),
    --('Sales Plan'!$B$2:$B$1876=Sheet1!$A$2),
    --('Sales Plan'!$D$2:$D$1876=Sheet1!$D7))
 
Upvote 0
Actually, I have one last question.

I have a dynamic named range called PartNoLookup which refers to

=OFFSET('Sales Plan'!$D$2,0,0,COUNTA('Sales Plan'!$D:$D),1), basically the same range as 'Sales Plan'!$D$2:$D$1876 with the ability to expand.

How come if I replace 'Sales Plan'!$D$2:$D$1876 with PartNoLookup, I get a #VALUE error?
 
Upvote 0
Actually, I have one last question.

I have a dynamic named range called PartNoLookup which refers to

=OFFSET('Sales Plan'!$D$2,0,0,COUNTA('Sales Plan'!$D:$D),1), basically the same range as 'Sales Plan'!$D$2:$D$1876 with the ability to expand.

How come if I replace 'Sales Plan'!$D$2:$D$1876 with PartNoLookup, I get a #VALUE error?

Which range on Sales Plan is numeric and the most complete?
 
Upvote 0
Any of columns A through F in 'Sales Plan' will have the same number of rows, guaranteed to have data, but only Column A is guaranteed to be numeric.
 
Upvote 0
Any of columns A through F in 'Sales Plan' will have the same number of rows, guaranteed to have data, but only Column A is guaranteed to be numeric.

The formula refers to:

'Sales Plan'!$G$2:$R$1876
'Sales Plan'!$A$2:$A$1876
'Sales Plan'!$B$2:$B$1876
'Sales Plan'!$D$2:$D$1876

Is the range in column A numeric and expected to be most complete at any time?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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