Sumproduct stopped working

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
593
Office Version
  1. 365
Platform
  1. Windows
I was using a sumproduct formula (below) to find numbers in column W to give me an average by month. It was working fine but I added a formula to column B to add the current day when a number is added to column W and now the sumproduct gives me a #value ! error. I tried removing the date formula from column b but I still am getting the error. What changed? Help!



=SUMPRODUCT(--(B282:B303<>""),--(MONTH(B282:B303)=4),W282:W303/SUMPRODUCT(--(B282:B303<>""),--(MONTH(B282:B303)=4)))
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You've probably already figured it out by now, but just in case you're still having problems, it looks like you've omitted a bracket in the first SUMPRODUCT, and added an extra one in the second. Try...

Code:
=SUMPRODUCT(--(B282:B303<>""),--(MONTH(B282:B303)=4),W282:W303)/SUMPRODUCT(--(B282:B303<>""),--(MONTH(B282:B303)=4))

Hope this helps!
 
Upvote 0
Thanks but not it. I checked the formula with a similar spreadsheet with the same formula and it works on that one. When I copy it over though I STILL get the #value ! error. I am totally lost on this one.
 
Upvote 0
It just a simple IF statement that when data is entered in column W then take the date in the above line in column B and add 7 days.

=IF(W288<>"",B287+7,"")

I just used cells at the bottom of the spreadsheet to have the SUMPRODUCT point to and it works fine like it did before. So the IF formula above has something to do with it.
 
Upvote 0
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

=SUM(IF(ISNUMBER(B282:B303),IF(MONTH(B282:B303)=4,W282:W303)))/SUM(IF(ISNUMBER(B282:B303),IF(MONTH(B282:B303)=4,1)))

Hope this helps!
 
Upvote 0
You can also use the AVERAGE function, and include the conditional statements...

Code:
=AVERAGE(IF(ISNUMBER(B282:B303),IF(MONTH(B282:B303)=4,W282:W303)))

...confirmed with CONTROL+SHIFT+ENTER.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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