# Help with a formula in Excel

#### rogerfoster88

##### New Member
 I am looking for a formula to go into G2 that finds the combined sum in column D that is adjacent to the product in column C, but for the choice of product to be dictated by the product name in F2. So the formula needs to be clever enough to change the volume if the name in F2 changes. Description Example 1 Column C Column D Column E Column F Column G Column C Column D Column E Column F Column G 1 Product Volume Product Total Volume 1 Product Volume Product Total Volume 2 Aaa 9000 Product name here Formula here 2 Aaa 7000 Aaa 7000 3 Bbb 9000 3 Bbb 9000 4 Bbb 9000 4 Bbb 9000 5 Ccc 9000 5 Ccc 9000 6 Ccc 5000 6 Ccc 5000 Example 2 Example 3 Column C Column D Column E Column F Column G Column C Column D Column E Column F Column G 1 Product Volume Product Total Volume 1 Product Volume Product Total Volume 2 Aaa 7000 Bbb 18000 2 Aaa 7000 Ccc 14000 3 Bbb 9000 3 Bbb 9000 4 Bbb 9000 4 Bbb 9000 5 Ccc 9000 5 Ccc 9000 6 Ccc 5000 6 Ccc 5000 I have used =Vlookup(F2,C1:G7,2,FALSE) and several iterations of it but I feel like vlookup isn't the answer for my question. Thanks in advanced for looking into this.

<tbody>
</tbody>

### Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

#### rogerfoster88

##### New Member
Oh man that worked thank you so much!

It's made me wonder if you could apply this to a 4 column rule instead of 2?

 Column C Column D Column E Column F Column G Column H Column I 1 Product Volume Product Volume Product Total Volume 2 Aaa 9000 Aaa 9000 Product name here formula here 3 Bbb 9000 Bbb 9000 4 Bbb 9000 EMPTY CELL EMPTY CELL 5 Ccc 9000 Ccc 1 6 Ccc 5000 Ccc 5000

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

#### rogerfoster88

##### New Member

Hi Fluff,

Thanks for your help on this, however i have come across an issue with it.

Excel 2013/2016
CDEFGHI
1ProductVolumeProductVolumeProductTotal Volume
2Aaa9000Aaa9000Ccc19001
3Bbb9000Bbb9000
4Bbb9000
5Ccc9000Ccc1
6Ccc5000Ccc5000

</tbody>

What i forgot to mention was that C2:C6 and E2:E6 are Data Validation drop-down lists and for some reason the formula inst liking it, as when i manually type in the data for the product names the formula works.

#### rogerfoster88

##### New Member

So what the issue seems to be is that even though i need =SUMIF(C:C,F2,D:D) i need it to only go from row 2 to 8 rather than reading the whole worksheet.

#### JackDanIce

##### Well-known Member
Based on @Fluff's suggestion try:
Rich (BB code):
``=SUMIF(\$C\$2:\$C\$8,H2,\$D\$2:\$D\$8)+SUMIF(\$E\$2:\$E\$8,H2,\$F\$2:\$F\$8)``

Last edited:

Thanks so much!

#### JackDanIce

##### Well-known Member
Fluff's efforts, I just added "\$", a few 2's and 8's!

Replies
4
Views
68
Replies
11
Views
65
Replies
1
Views
35
Replies
1
Views
43
Replies
7
Views
76