SUMPRODUCT use

crocco

Board Regular
Joined
Jan 28, 2010
Messages
142
I think this is an incorrect use of sumproduct but im trying to total a column (QAMT) pulling the result to relevant column headings (B2,B3, etc Months of the years) based on whether the month are in any of four possible columns (QUART1,QUART2, etc) and there is a match in a property number column as well (QPROP) on a spearate table.



=SUMPRODUCT((QAMT),(OR(QUART1=B2,QUART2=B2,QUART3=B2,QUART4=B2))*(QPROP=A6))


I am assuming that SUMPRODUCT doesnt like my use of OR? How do I get around this?

Thanks in advance
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
After some googling Ive seen how SUMPRODUCT users ORs so adapted my formula but still with no luck:

=SUMPRODUCT((QAMT),(QUART1=B2)+(QUART2=B2)+(QUART3=B2)+(QUART4=B2)*(QPROP=A6))
 
Upvote 0
After some googling Ive seen how SUMPRODUCT users ORs so adapted my formula but still with no luck:

=SUMPRODUCT((QAMT),(QUART1=B2)+(QUART2=B2)+(QUART3=B2)+(QUART4=B2)*(QPROP=A6))

Does this...

Rich (BB code):
=SUMPRODUCT(
   QAMT,
   --((QUART1=B2)+(QUART2=B2)+(QUART3=B2)+(QUART4=B2))>0),
   --(QPROP=A6))
help?
 
Upvote 0
Unfortunately not. When I copy and paste straight from your post excel says theres an error and trys to correc tit.

What should I try?

Thanks for your help
 
Upvote 0
If it helps:

QUART1,QUART2, etc will NEVER have the same infornmation as eachother on the same row


I have checked my named ranges are all the same size and cover the same row numbers
 
Upvote 0
Unfortunately not. When I copy and paste straight from your post excel says theres an error and trys to correc tit.

What should I try?

Thanks for your help

Oops... I meant:
Rich (BB code):
=SUMPRODUCT(
  QAMT,
  --((QUART1=B2)+(QUART2=B2)+(QUART3=B2)+(QUART4=B2)>0),
  --(QPROP=A6))
 
Upvote 0
398 for all of them. I checked the ranges were definitely the same size already.

thanks
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,460
Members
448,965
Latest member
grijken

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