SUMPRODUCT

xxsalahxx

Active Member
Joined
Jun 25, 2011
Messages
316
Office Version
  1. 2007
Hello
I have a formula that is working perfectly in my database however i wish to expand on it and cant seem to work this out the formula is as below.
=SUMPRODUCT((Data!B:B>='Sheet2'!A10)*(Data!B:B<='Sheet2'!B10)*(Data!G:G='Sheet2!$C$1))

The formula works as follows:
The Data Sheets has multiple dates and im looking at this over months and years, i have added in dates to capture this into Columns A and B on sheet 2
Then im taking from the data sheet column G the name of a place which I have added into Sheet2 cell C1
However I wish to pick up the names of other places which are in cells C2 & C3 on sheet2 and total these all together. is this possible?

I use excel 2007

Thanking in advance for any help
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hello,
Your request is not extremely clear ...
But, you can always add up several Sumproduct formulas ...

If you want a single formula, just remember for your conditions :
1. the * operator means AND
2. the + operator means OR
 
Upvote 0
Hi, thank you for responding to my question so quickly, this is what ive tried this is my full analysis but does not seem to work, its working perfectly when i just use C1 but when asking to use C1 +C2 +C3 then it returns a zero and there is definately data on the data sheet that should be showing, is there another way?

=SUMPRODUCT(--(Data!$B:$B>=A10)*(Data!$B:$B<=B10)*(Data!$G:$G='St Marg'!$C$1)*(Data!G:G='St Marg'!$C$2)*(Data!G:G='St Marg'!$C$3))
 
Upvote 0
Is the formula on the "St Marg" sheet?
 
Upvote 0
Ok, how about
Excel Formula:
=SUMPRODUCT(--(Data!$B:$B>=A10)*(Data!$B:$B<=B10)*((Data!$G:$G=$C$1)+(Data!G:G=$C$2)+(Data!G:G=$C$3)))
 
Upvote 0
Solution
Ok, how about
Excel Formula:
=SUMPRODUCT(--(Data!$B:$B>=A10)*(Data!$B:$B<=B10)*((Data!$G:$G=$C$1)+(Data!G:G=$C$2)+(Data!G:G=$C$3)))
Thank you so much that worked perfectly!! Headaches gone now!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

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