SUMIF on 2 criteria...

Stu Dapples

Active Member
Joined
Jan 12, 2009
Messages
252
I have a sheet which contains product family and the machine on which they are made, I need to sum the demand for a given week (contained in another column) if Column B is "Lorry" and Column I is "T1"....

I need to do this for 3 product types (ferrari, car and lorry) and 6 machines....

Any ideas? :confused:
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I have a sheet which contains product family and the machine on which they are made, I need to sum the demand for a given week (contained in another column) if Column B is "Lorry" and Column I is "T1"....

I need to do this for 3 product types (ferrari, car and lorry) and 6 machines....

Any ideas? :confused:
It's not real clear (to me) what you want to do.

Try rephrasing your question something like this...

Sum D2:D10 if:
A2:A10 meets this condition
B2:B10 meets this condition

What version of Excel are you using?
 
Upvote 0
It's not real clear (to me) what you want to do.

Try rephrasing your question something like this...

Sum D2:D10 if:
A2:A10 meets this condition
B2:B10 meets this condition

What version of Excel are you using?
Excel 2010

Sum I2:I40 ONLY if:

B2:B40 = Lorry
AND L2:L40 = T1 (Column L is the Week 14 demand)

I need to repeat this for B range equalling Car and Ferrari
and also I range equalling T1, T2, T3, DS or MPI

I then need to repeat the whole thing for Column M through S
so by my calcs thats potentially 15 sums it needs to do... Pivot is not giving me what I need, it is graphing each family (car lorry etc) with a week above it and I need the sum total....

Effectively, what is the sum of demand in each column which fits lorry/ T1, lorry/ T2, Lorry/ T3 etc

Hope that clarifies a little?
 
Upvote 0
Rich (BB code):
=SUMPRODUCT(--(B2:B40="Lorry"),--(I2:I40=""T1"),L2:L40)

lenze

Hint:You can use a cell reference for your criteria to reduce the number of formulas needed
Rich (BB code):
=SUMPRODUCT(--(B2:B40=AB1),--(I2:I40=AB2),L2:L40)
 
Upvote 0
Excel 2010

Sum I2:I40 ONLY if:

B2:B40 = Lorry
AND L2:L40 = T1 (Column L is the Week 14 demand)

I need to repeat this for B range equalling Car and Ferrari
and also I range equalling T1, T2, T3, DS or MPI

I then need to repeat the whole thing for Column M through S
so by my calcs thats potentially 15 sums it needs to do... Pivot is not giving me what I need, it is graphing each family (car lorry etc) with a week above it and I need the sum total....

Effectively, what is the sum of demand in each column which fits lorry/ T1, lorry/ T2, Lorry/ T3 etc

Hope that clarifies a little?
Let's assume your data is on Sheet1.

In Sheet2 you have these row/column headers:

Book1
ABCDE
1T1T2T3Ds
2Lorry
3Car
4Ferrari
Sheet2

Enter this formula in B2:

=SUMIFS(Sheet1!$I$2:$I$40,Sheet1!$L$2:$L$40,B$1,Sheet1!$B$2:$B$40,$A2)

Copy across to E2 then down to B4:E4.
 
Upvote 0
Rich (BB code):
=SUMPRODUCT(--(B2:B40="Lorry"),--(I2:I40=""T1"),L2:L40)

lenze

Hint:You can use a cell reference for your criteria to reduce the number of formulas needed
Rich (BB code):
=SUMPRODUCT(--(B2:B40=AB1),--(I2:I40=AB2),L2:L40)


I think you cracked my friend!! I need a little tweaking but it looks good! Many thanks :biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,233
Members
452,898
Latest member
Capolavoro009

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