SUMPRODUCT is not returning required value

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
719
Office Version
  1. 2010
Platform
  1. Windows
Hello:

I have a pivot table with Jan...Dec in A6 to A13 and Sum of Amounts in D6 to D13.

I want the add sum of amount for Jan, Feb and Mar in I9. The formula below is returning zero.

=SUMPRODUCT(($A$6:$A$13="Jan")*($A$6:$A$13="Feb")*($A$6:$A$13="Mar")*($D$6:$D$13))

Could you help me fix formula?

Thank you

Sean
 
Last edited:

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

If those are Real Dates in Column A, try this:


Book1
ADI
6Jan1
7Feb2
8Mar3
9Apr46
10May5
11Jun6
12Jul7
13Aug8
Sheet89
Cell Formulas
RangeFormula
I9=SUMPRODUCT((MONTH($A$6:$A$13)={1,2,3})*$D$6:$D$13)
 
Upvote 0
Hi:

No dates in column A. just month name displayed in pivot table as Jan, Feb, Mar...Dec

Your formula is returning #value !


Regards,

Sean
 
Upvote 0
Ok, so Column A is TEXT, then do this:


Book1
ADI
6Jan1
7Feb2
8Mar3
9Apr46
10Jun5
11Jul6
12Aug7
13Sep8
Sheet89
Cell Formulas
RangeFormula
I9=SUMPRODUCT(($A$6:$A$13={"Jan","Feb","Mar"})*$D$6:$D$13)
 
Upvote 0
Excellent, thank you so much.


Regards,

Sean
 
Upvote 0
Ok, so Column A is TEXT, then do this:


Book1
ADI
6Jan1
7Feb2
8Mar3
9Apr46
10Jun5
11Jul6
12Aug7
13Sep8
Sheet89
Cell Formulas
RangeFormula
I9=SUMPRODUCT(($A$6:$A$13={"Jan","Feb","Mar"})*$D$6:$D$13)

Hi:

Sorry to bring this up again, if there are dates in column A, like:

01/10/18
02/05/18
03/01/18
03/02/17

and I want to add amounts for Jan-Mar 18.

Could you amend formula?

Thanks,

Sean
 
Last edited:
Upvote 0
Assuming that your entries are still text and not valid dates, try:
Code:
=SUMPRODUCT((LEFT($A$6:$A$13,2)={"01","02","03"})*(RIGHT($A$6:$A$13,2)="18")*$D$6:$D$13)

If they are actually valid date entries, you can use this instead:
Code:
=SUMPRODUCT((MONTH($A$6:$A$13)={1,2,3})*(YEAR($A$6:$A$13)=2018)*$D$6:$D$13)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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