# Help required with SUMIF function from Table with helper column

#### driver_1980

##### New Member
Hello

I've been applying a solution posted by Rijnsent to take sales data of finished products and populate a raw materials inventory table. Here is the solution posted by Rijnsent: -
Hi Icecream Man,
so for your raw materials you have a starting inventory from which you want to deduct if it is used by filling in finished product? How many different ingredients are there?

1) products:
date - product - batches
22-1-2019 - vanilla ice cream - 2
21-1-2019 - strawberry ice cream - 3

2) formulations (table)
Name - ingredient - quantity
vanilla - milk - 6
vanilla - vanilla - 1
vanilla - sugar - 3
strawberry - milk - 6
strawberry - sugar - 2
strawberry - strawberry - 1

3) stock on hand
ingredient - start stock - usage in period - leftover stock
milk - 12 - ? - ?
vanilla - 10 - ? - ?
sugar - 10 - ? - ?

There are multiple routes you can take. A simple one is e.g. adding columns to sheet 1: one for each ingredient. Next, add a column to table 2 with a helper value, merging the product and ingredient, e.g. "strawberry_sugar" and "vanilla_sugar". In sheet 1, do a VLOOKUP on that table with the column header (the ingredient) and the row title (the product) to pick up the quantity needed per batch. See this for help: https://exceljet.net/formula/vlookup-with-multiple-critiera
Next, for sheet 3 you can use SUMIFS to pick up that data from sheet 1. Define for yourself what the period is, you can e.g. pick up all milk used in january, see SUMIFS with date range as criteria on how to use that formula with date ranges.

Hope that gets you started,

Koen
The next step is to
Sales of finished products are recorded in this table with columns for each raw material: -
View attachment 26581
The sales data above is referenced against this bill of materials table using a VLOOKUP formula and the helper column: -
View attachment 26582
The final part of Rijnsent's solution is to use a SUMIF function for Column F (used in production) in my raw materials inventory table below: -
View attachment 26583

The problem I have now is that when I input the formula =SUMIF(Table57[[Item description]:[Price]],[@Products],Table57[Small black box]), into the 'Used in Production' (Column F), the formula for the entire column is the small black box. If I change it to large black box (or any other column reference) in one cell, it copies it for every other cell in that column. Is there anyway I can stop this from happening? P.S. Table 57 is the 'sales table'. Thank you.

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
For some reason it hasn't uploaded the screenshots I'd taken. Here they are: -
Sales of finished products are recorded in this table with columns for each raw material: -

The sales data above is referenced against this bill of materials table using a VLOOKUP formula and the helper column: -

The final part of Rijnsent's solution is to use a SUMIF function for Column F (used in production) in my raw materials inventory table below: -

Replies
0
Views
189
Replies
11
Views
501
Replies
3
Views
518
Replies
1
Views
558
Replies
1
Views
155

1,206,947
Messages
6,075,798
Members
446,158
Latest member
octagonalowl

### 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.

### Which adblocker are you using?

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

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