Sumproduct with Trim

Katy Jordan

Well-known Member
Joined
Jun 28, 2008
Messages
596
Hi, i want to add trim to the interest as there are trailing spaces in the main data and the formula returns #VALUE, how can i do that,

=SUMPRODUCT((Sheet1!C1:C65000="INTEREST")*(Sheet1!D1:D65000))
 
If I were to guess I'd suspect row 1 to be a header row with text in. Try:
=SUMPRODUCT(--(TRIM(Sheet1!C1:C65000)="INTEREST"),Sheet1!D1:D65000)

if you still get #VALUE then you have error values somewhere.

If i was to add another criteria to this then i did this, the result returned 0.00 but when put as indivduals they return corrrect result. So why 0.00 when combined?

=SUMPRODUCT(--(TRIM(Sheet1!C1:C65000)="INTEREST"),
--(TRIM(Sheet1!C1:C65000)="INT.ACC"),Sheet1!D1:D65000)
 
Upvote 0

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.
But this seems to work with SUMIF, bizzare

=SUMIF(RawData!C:C,"*" & "INTEREST" & "*",RawData!D:D)+SUMIF(RawData!C:C,"*" & "INT. ACC" & "*",RawData!D:D)
 
Upvote 0
"INT.ACC"
vs
"INT. ACC"

but as previously mentioned, SUMIF is more efficient than sumproduct
 
Upvote 0

Forum statistics

Threads
1,225,155
Messages
6,183,214
Members
453,151
Latest member
Lizamaison

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