Sumproduct not returning correctly

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
Can somone tell me why the Sumproduct formulas below are reading the blank cells as JAN.

Excel Workbook
GHIJ
1Bill 1Bill 2Bill 3
2JAN$6,147.00$15,331.50$25,069.50
3
4$6,343.00-$203.0012/21/101/3/11
5$6,343.00$397.0012/31/101/8/11
6$6,255.00$2,325.001/8/111/21/11
7$6,109.00$1,478.001/14/111/26/11
8$5,519.00$437.001/5/111/14/11
9$6,607.00$678.001/21/111/28/11
10$6,173.00$17.00
11$3,967.00-$2,970.003/9/113/9/11
12$617.00$803.003/9/11
13$6,109.00$105.002/25/113/10/11
14$6,173.00$215.002/23/11
15$6,173.00$215.003/11/113/16/11
Sheet2



The correct answers should be:

Excel Workbook
HIJ
18Bill 1Bill 2Bill 3
19$5,112.00$12,245.00$18,588.00
Sheet2



Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
In some cases Excel treats a blank cell as zero....and in Excel "date zero" is "0th" of Jan 1900, so if you use, e.g.

=MONTH(A1)

where A1 is blank you get 1 (for January)...it's also a Saturday (excel says) so

=WEEKDAY(A1)=7 (assuming 1900 date system)

so in cases like this you need to add a criteria for the year perhaps...or check the cells aren't blank like this:

=SUMPRODUCT((TEXT($J$3:$J$67,"mmm")=$G$2)*($J$3:$J$67<>""),$H$3:$H$67)
 
Upvote 0
Thanks Barry

Your explanation taught me something new today.

Your formula works by checking for blanks.

How would I put in a criterior for the year because I can see that further down in my table I will have Dec 2011.

In this snippet of my table you can see that I already have Dec 2010 so I wouldn't want to add 2010 and 2011 numbers together.
 
Upvote 0
If you make G2 Jan-11 then try using this version

=SUMPRODUCT((TEXT($J$3:$J$67,"mmm-yy")=TEXT($G$2,"mmm-yy"))+0,$H$3:$H$67)
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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