Search and Sum?

Gesyca_is_joy

Board Regular
Joined
Apr 24, 2014
Messages
90
Office Version
  1. 365
Platform
  1. Windows
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]1
[/TD]
[TD]a[/TD]
[TD]2[/TD]
[TD]b[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b[/TD]
[TD]1[/TD]
[TD]d[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a[/TD]
[TD]3[/TD]
[TD]a[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]d[/TD]
[TD]5[/TD]
[TD]c[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c[/TD]
[TD]6[/TD]
[TD]d[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have a table in it that holds data. I have a second table that will report a total count off the first table. An example of my “data” table is above. The formula I am trying to write needs to search for a value “a” and when it finds that value then will multiply the cell immediately to the right of “a” against the first cell in the row and return the sum total for the whole table.

In the example table above I have 3 instances of “a” , one with a 2 next to it, one with a 3 next to it and one with a 1 next to it. So those three values (2, 3, 1) all need to be multipled against the first cell in their respective rows, then the totals added together. So the formula for a needs to reply with the sum total of (2*1)+(3*1)(1*1)=6
I am trying to write this formula as opposed to doing it manually because my table is much larger than the example and it takes forever to get a count live.
 
Last edited:
Formula in G1 copied down:


Excel 2010
ABCDEFG
11a2b1a6
22b1d1b3
31a3a1c33
45d5c3d33
53c6d2
Sheet1
Cell Formulas
RangeFormula
G1=SUMPRODUCT((((B$1:B$5=F1)*C$1:C$5)+((D$1:D$5=F1)*E$1:E$5)),A$1:A$5)
 
Upvote 0
Imvoking an array formula...

[TABLE="width: 384"]
<COLGROUP><COL style="WIDTH: 48pt" span=8 width=64><TBODY>[TR]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]a[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]2[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]b[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl63, width: 64, bgcolor: white"]a[/TD]
[TD="class: xl64, width: 64, bgcolor: transparent, align: right"]6[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]2[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]b[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]d[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl63, width: 64, bgcolor: white"]b[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]a[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]a[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]1[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl63, width: 64, bgcolor: white"]c[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]33[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]d[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]c[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl63, width: 64, bgcolor: white"]d[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]33[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]c[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]6[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]d[/TD]
[TD="class: xl63, width: 64, bgcolor: white"]2[/TD]
[TD="class: xl65, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: white"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
</TBODY>[/TABLE]

H1, control+shift+enter, not just enter, and copy down:

=SUM(IF($B$1:$D$5=$G1,$C$1:$E$5*$A$1:$A$5))
 
Upvote 0
Ok what I am trying to do is write a calculator to balance chemical equations. Every other column is a subscript for each element that defaults to "1" unless another number is entered. the table labeled "reactant" over to the right is where I will enter a formula in the cell under "N" to find the total number of "N" atoms in the reactant side of the equation, so on and so forth. the tables with the blue and red headers are named and the boundaries of those tables are boxed in via border so I know how far the tables go. I tried your formula but kept getting an error message?


[TABLE="width: 856"]
<colgroup><col width="31" style="width: 23pt; mso-width-source: userset; mso-width-alt: 1133;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"> <col width="31" style="width: 23pt; mso-width-source: userset; mso-width-alt: 1133;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="12" style="width: 9pt; mso-width-source: userset; mso-width-alt: 438;"> <col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"> <col width="64" style="width: 48pt;" span="7"> <tbody>[TR]
[TD="width: 72, bgcolor: #0070C0, colspan: 3"]Reactant[/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 29, bgcolor: #0070C0"] [/TD]
[TD="width: 12, bgcolor: #0070C0"] [/TD]
[TD="width: 26, bgcolor: transparent"] [/TD]
[TD="width: 60, bgcolor: red, colspan: 2"]Product[/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 29, bgcolor: red"] [/TD]
[TD="width: 12, bgcolor: red"] [/TD]
[TD="width: 26, bgcolor: transparent"] [/TD]
[TD="width: 128, bgcolor: transparent, colspan: 2"]Reactant[/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent"]N[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]O[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]N[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]N[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"]O[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]O[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]Product[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]N[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"]O[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, colspan: 2"]Difference[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]N[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"]O[/TD]
[TD="bgcolor: transparent"]H[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Reactant part...

AG3, control+shift+enter (CSE), not just enter, and copy across:
Rich (BB code):
=SUM(IF($B$2:$N$10=AG$2,$C$2:$O$10*$A$2:$A$10))

Product part...

AG6, CSE and copy across:
Rich (BB code):
=SUM(IF($R$2:$AD$10=AG$6,$S$2:$AE$10*$Q$2:$Q$10))

The Difference part looks obvious. Adjust the ranges to suit if necessary.
 
Upvote 0

Forum statistics

Threads
1,226,854
Messages
6,193,369
Members
453,792
Latest member
Vic001

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