Combining SUMPRODUCT with text/value conversion for

Bruno37

New Member
Joined
Jun 17, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hey!

I need a formula that works to get the SUM of the product (F7:K7) by corresponding array (F$6:K$6).
The key problem seems to be that F7:K7 is text. Thus, I'm trying to incorporate what each text equals {100,66,33,0} within the formula, but get a #VALUE! error:

=SUMPRODUCT(COUNTIF(F7:K7,{"High","Med","Low","Zero"})*{100,66,33,0})* F$6:K$6

Appreciate any help to make it work. Thanks a lot!
 

Attachments

  • Capture.JPG
    Capture.JPG
    141.1 KB · Views: 23

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.
Put in any free space a lookup table, I chose N1:N4 = High Med Low Zero and O1:O4 = 100 66 33 0

And then in L7 and drag down: =SUM(INDEX(O$1:O$4,MATCH(F7:K7,N$1:N$4,))*F$6:K$6)
You may need to array-enter it.

See if that is what you had in mind.

Regards
 
Upvote 0
Welcome to the forum!

Try:

Book1
FGHIJKL
610%4%4%4%4%4%
7HighMedLowZeroMedHigh20.6
8MedZeroZeroLowHighMed14.56
Sheet2
Cell Formulas
RangeFormula
L7:L8L7=SUMPRODUCT($F$6:$K$6,MMULT({100,66,33,0},--(F7:K7={"High";"Med";"Low";"Zero"})))
 
Upvote 0
Should it be:

Book6
FGHIJKL
610%4%4%4%4%4%
7HighHighHighMedHighHigh52.64
8MedMedMedMedMedMed15.84
9ZeroZeroZeroZeroZeroZero0
10MedMedMedMedMedMed15.84
11LowLowLowLowLowLow7.92
Sheet2
Cell Formulas
RangeFormula
L7:L11L7=SUM(IFERROR(COUNTIF(F7:K7,{"High","Med","Low","Zero"})*{100,66,33,0}*F$6:K$6,0))


Probably Eric is right with a matrix multiply to take each column separately with their percent values.
 
Last edited:
Upvote 0
Hey!

I need a formula that works to get the SUM of the product (F7:K7) by corresponding array (F$6:K$6).
The key problem seems to be that F7:K7 is text. Thus, I'm trying to incorporate what each text equals {100,66,33,0} within the formula, but get a #VALUE! error:

=SUMPRODUCT(COUNTIF(F7:K7,{"High","Med","Low","Zero"})*{100,66,33,0})* F$6:K$6

Appreciate any help to make it work. Thanks a lot!
Than
Welcome to the forum!

Try:

Book1
FGHIJKL
610%4%4%4%4%4%
7HighMedLowZeroMedHigh20.6
8MedZeroZeroLowHighMed14.56
Sheet2
Cell Formulas
RangeFormula
L7:L8L7=SUMPRODUCT($F$6:$K$6,MMULT({100,66,33,0},--(F7:K7={"High";"Med";"Low";"Zero"})))

THANK YOU SO MUCH ERIC!! ??? That worked smoothly perfect :)
 
Upvote 0
Try below, using SUMIF/SUMPRODUCT:

=SUMPRODUCT(SUMIF(F7:K7,{"High","Med","Low","Zero"},F$6:K$6)*({100,66,33,0}))
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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