Sumproduct #NUM error

mlouise

New Member
Joined
Jul 28, 2008
Messages
4
Help! I am a self-taught Excel beginner. I am using the following equation:

=SUMPRODUCT(--(Expenses!$C:$C='Monthly Totals'!$B4),--(Expenses!$F:$F='Monthly Totals'!$C$3),Expenses!$H:$H)

In this form it returns a #NUM error. If I modify it to this second version:

=SUMPRODUCT(--(Expenses!$C$1:$C$65535='Monthly Totals'!$B4),--(Expenses!$F$1:$F$65535='Monthly Totals'!$C$3),Expenses!$H$1:$H$65535)

it works properly, but when I go to view a different worksheet the equation reverts back to the first version and returns the #NUM error. This happens every time I switch to a different worksheet.

Is there any easy fix or explanation? Thanks!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
SUMPRODUCT requires explicit ranges instead of whole columns, E1:E1000 rather than E:E. (Or larger if your data needs it.)

=SUMPRODUCT(--(Expenses!$C1:$C1000='Monthly Totals'!$B4),--(Expenses!$F1:$F1000='Monthly Totals'!$C$3),Expenses!$H1:$H1000)
 
Upvote 0
Yes, it works when I use the explicit range. My problem is that when I view a different worksheet in the same workbook that equation somehow loses the explicit ranges and returns the #NUM error again.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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