Sumproduct or DSum help

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,141
Office Version
  1. 365
Platform
  1. Windows
Hi

I need to sum the values where
A2:A517="x"
AND
H2:H517="y" Or H2:H517="z"
the data to be summed is in IH2:IH517

I can write a sumproduct to do OR
I can write a sumproduct to do AND
but not both

research suggest using DSUM but I do not understand how to apply it to this query.

can anyone help
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try

=SUMPRODUCT(--(A2:A517="x"),--ISNUMBER(MATCH(H2:H517,{"y","z"},0)),IH2:IH517)
 
Upvote 0
Hi VoG

Love the idea, but it didnt seem to work I got 0 returned

M
 
Upvote 0
Can I ammend this to be
A2:A517="x"
AND
H2:H517>= 123 AND H2:H517<=456

I've tried these two but get 0 returned
Code:
=SUMPRODUCT(1*(B2:B104281=N3),1*(J2:J104281>=P1),1*(J2:J104281<=W1)*E2:E104281)
Code:
=SUMPRODUCT(--(B2:B104281=N3),--(J2:J104281>=P1),--(J2:J104281<=W1)*E2:E104281)
 
Upvote 0
Ignore me I'm a tw*t If I had put in the correct column (again) the formula would have worked!!!
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
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