Sumproduct question

cwallace70

Board Regular
Joined
Mar 7, 2011
Messages
172
I would like to perform a sumproduct for the following but I keep getting value as the sum. The formula is as follows
=SUMPRODUCT(--(A2:A50000="LU"),--(LEFT(E2:E50000,1)="K"),--(H2:H50000))

My spreadsheet have a dept in column A, a code in column E and an amount in column H.
I want to get a sum if column A have the dept code of "LU" and a code of "H" then sum all the amounts in column H that fits those first two criteria's. I am using excel 2003 and cannot get this formula to work. Please help. What am I doing wrong
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Is the there something missing from the last argument? --(H2:H50000)

If not I don't think you need/want to use the -- there.
 
Upvote 0
Welcome to the Board!

Try:

=SUMPRODUCT(--(A2:A50000="LU"),--(LEFT(E2:E50000,1)="K"),H2:H50000)

Matty
 
Upvote 0
To expand on my previous question, I have Tabs Jan to Dec. with column A having the the dept code "LU" and column E having the code "H" and column H having the amounts I want to sum. How can I get this to all sum up to a summary sheet? Please help this is driving me crazy :confused:
 
Upvote 0
Well, if your data actually goes to 50,000 rows on each sheet I suggest you don't use formulas - that many rows across 12 sheets will be slow to calculate, I expect. Instead maybe a pivot table. What do you think?
 
Upvote 0
My spreadsheet have a dept in column A, a code in column E and an amount in column H.
I want to get a sum if column A have the dept code of "LU" and a code of "H" then sum all the amounts in column H that fits those first two criteria's. you gave me this formula =SUMPRODUCT(--(A2:A50000="LU"),--(LEFT(E2:E50000,1)="K"),H2:H50000) which worked great, but is there a formula I can use so that I do not have to hard code each dept code, instead I want it to look any where on thespread sheet and find the sum of, for example dept 33 with a H code and a sum.
is that possible?
 
Upvote 0
My spreadsheet have a dept in column A, a code in column E and an amount in column H.
I want to get a sum if column A have the dept code of "LU" and a code of "H" then sum all the amounts in column H that fits those first two criteria's. you gave me this formula =SUMPRODUCT(--(A2:A50000="LU"),--(LEFT(E2:E50000,1)="K"),H2:H50000) which worked great, but is there a formula I can use so that I do not have to hard code each dept code, instead I want it to look any where on thespread sheet and find the sum of, for example dept 33 with a H code and a sum.
is that possible?

J2: LU

J3: LQ

K1: H

L1: U

K2, just enter, copy across, and down:

=SUMPRODUCT(--($A$2:$A$50000=$J2),--(LEFT($E$2:$E$50000,1)=K$1),$H$2:$H$50000)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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