how to multiply the a const value with the sumproduct

kiran5388

Board Regular
Joined
Sep 7, 2021
Messages
62
Office Version
  1. 365
Platform
  1. Windows
TodayCalcSample.xlsx
ABCDEFG
1ProductA2222
2ProductA21
3ProductB220
4ProductA21
5ProductC212
6
7
8
9Expected result isB1*C1*D1*E1
10B2*C2*D2*E1
11B3*C3*D3*E1
12B4*C4*D4*E1
13B5*C5*D5*E1
14SUM(B9:B13)
1528
16Criteria: if BLANK in any row, ignore the row in calculation
17I have done SUMPRODUCT for B,C,D and how to multiply E1 to each row
1812
19
Sheet3
Cell Formulas
RangeFormula
B18B18=SUMPRODUCT((B1:B5<>"")*1,(C1:C5<>"")*1,(D1:D5<>"")*1,B1:B5,C1:C5,D1:D5)
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Check your expected results, what should happen with the blanks in C2 and D4? It appears that you have only allowed for the blanks in column E.

It would help if you also provided the expected calculation of each individual row, based on your logic I get a total of 32, not 28.
 
Upvote 0
Check your expected results, what should happen with the blanks in C2 and D4? It appears that you have only allowed for the blanks in column E.

It would help if you also provided the expected calculation of each individual row, based on your logic I get a total of 32, not 28.
So, from B,C,D any cell is Blank then ignore the whole row. Therefore Row1 and Row5 are good for the calculation, so Row1 = 2*2*2*2=16 , Row5 = 2*1*2*2=8. Row1+Row5= 16+8=24, my bad I mentioned 28. Anyways, I figured it out the solution here is the formula =SUMPRODUCT((B1:B5<>"")*1,(C1:C5<>"")*1,(D1:D5<>"")*1,E1*(B1:B5),C1:C5,D1:D5) which equal to 24
 
Upvote 0
You don't need the logical tests, empty cells will default to 0 anyway.
Excel Formula:
=SUMPRODUCT(B1:B5*C1:C5*D1:D5*E1)
 
Upvote 0
What is expected result?

T202110b.xlsm
ABCDEFG
1ProductA222216TRUE
2ProductA210FALSE
3ProductB2200TRUE
4ProductA210FALSE
5ProductC2128TRUE
62424
724
1c
Cell Formulas
RangeFormula
F1:F5F1=(COUNT(B1:D1)=3)*PRODUCT(B1:D1)*$E$1
F6F6=SUM(F1:F5)
G1:G5G1=COUNT(B1:D1)=3
G6G6=SUMPRODUCT(--(G1:G5=TRUE),B1:B5,C1:C5,D1:D5)*E1
G7G7=SUMPRODUCT(B1:B5,C1:C5,D1:D5)*E1
 
Last edited:
Upvote 0
You don't need the logical tests, empty cells will default to 0 anyway.
Excel Formula:
=SUMPRODUCT(B1:B5*C1:C5*D1:D5*E1)
Thanks for the reply, Actually, I need those logical test for the average, I dnt consider the blank cells in calculation and also its needed for multiplying E1 which are not blank, if not it will become 0. Anyways the answer should be 24 for the above.
 
Upvote 0
What is expected result?

T202110b.xlsm
ABCDEFG
1ProductA222216TRUE
2ProductA210FALSE
3ProductB2200TRUE
4ProductA210FALSE
5ProductC2128TRUE
62424
724
1c
Cell Formulas
RangeFormula
F1:F5F1=(COUNT(B1:D1)=3)*PRODUCT(B1:D1)*$E$1
F6F6=SUM(F1:F5)
G1:G5G1=COUNT(B1:D1)=3
G6G6=SUMPRODUCT(--(G1:G5=TRUE),B1:B5,C1:C5,D1:D5)*E1
G7G7=SUMPRODUCT(B1:B5,C1:C5,D1:D5)*E1
Thanks for the solution
 
Upvote 0
Actually, I need those logical test for the average, I dnt consider the blank cells in calculation and also its needed for multiplying E1 which are not blank, if not it will become 0. Anyways the answer should be 24 for the above.
With the formula that I suggested the answer is 24 for the sample provided, the way that the formula works the empty cells will be converted to 0 as part of the calculation.

If you dismiss something that you don't understand because you think it is incorrect then you will never learn anything new.
 
Upvote 0
With the formula that I suggested the answer is 24 for the sample provided, the way that the formula works the empty cells will be converted to 0 as part of the calculation.

If you dismiss something that you don't understand because you think it is incorrect then you will never learn anything new.
yeah I understood, and got your point. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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