Help required with SUMIF function from Table with helper column

driver_1980

New Member
Joined
Nov 14, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
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?

So going by your name:

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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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: -
1606322842982.png


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

1606322896529.png


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: -
1606322796758.png
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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