How to sum one cell based on multiple cells

Emma Eve

New Member
Joined
Jan 24, 2018
Messages
20
I apologize for uploading just an image. I tried to install the xl2BB and could not get it to work despite following each links instructions.

Using the image to describe the problem, I am having difficulty summing the number of inputs based on how many times a component appears.

For example, the yellow cell needs to return the number of Input Alpha based on the Components in that row. In this case, the result of the formula should be 10 because Component A appears twice with one input for each alpha, Component B appears once with two inputs for each alpha and Component C appears twice with three inputs for each alpha. Following the same logic, the results for input Charlie in the orange cell should be 40. I have tried SUMIFS, INDEX/MATCH, VLOOKUPS, COUNTIFS.
 

Attachments

  • Screenshot 2021-09-28 103419.png
    Screenshot 2021-09-28 103419.png
    19.9 KB · Views: 22

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
We dont have any cell refs but something like this can be adapted:

=SUMPRODUCT(SUMIFS(I2:I4,H2:H4,A8:E8))
 
Upvote 0
How about this? You may need to do Ctrl+Shift+Enter depending on your version of Excel.

Book2
ABCDEFGHIJKLMNOPQR
412345AlphaBravoCharlieDeltaComponentAlphaBravoCharlieDelta
5AABCC10204050A1278
6AABBB8163846B24810
7C36912
Sheet3
Cell Formulas
RangeFormula
H5:K6H5=SUM(INDEX(O$5:O$7,MATCH($A5:$E5,$N$5:$N$7,0)))
 
Upvote 0
Try:

Book1
ABCDEFGHIJKLMNOPQR
16Components TableInputs
1712345GroupedDayAlphaBravoCharlieDeltaComponentAlphaBravoCharlieDelta
18AABCCA,A,B,C,CFirst Set - Part 110204050A1278
19AABBBA,A,B,B,BSecond Set - Part 28163846B24810
20C36912
Sheet4
Cell Formulas
RangeFormula
H18:K19H18=SUMPRODUCT(SUMIF($N$18:$N$20,$A18:$E18,O$18:O$20))
F18:F19F18=TEXTJOIN(",",1,A18:E18)
 
Upvote 0
Solution
Thank you all for your responses! I plugged the formulas into the spreadsheet and it works perfectly!
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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