Need help subtracting daily from a total inventory amount that is replenished every so often

daltendavis

New Member
Joined
Jun 26, 2018
Messages
37
My workbook is broken into 3 separate sheets, #1 I am entering in a daily amount of different bundles and or products which each have their own cell. This string of data is essentially copied to sheet #2 and deleted from sheet #1 as sheet #1 's only responsibility is the daily input. Sheet 2 serves as the "database" and is updated daily. Sheet # 3 is where I need help.

Sheet #3 serves as the inventory tracker and needs to be depleted as sheet # 2 is updated. The range where the daily data in sheet 2 starts at is E3:O3 and R3:AJ3. Each of those 30 cells has a cell on sheet 3 that needs to be depleted via formula/VBA/anything dependent on what is updated for the corresponding column on sheet 2. I will post an example of what my sheet 2 and 3 look like.

Sheet 2:

EFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
2DateabcdefghijDate123456789101112131415161718
32/5/20191534689101112/5/2019001360014800011169
42/6/2019146769111102/6/201900000014689752423

<tbody>
</tbody>

Row 3/4 serve as examples of what the table will look like as it begins to generate. So again, for example row 3 column F, there would be 15 of product "a" going out. This would then be subtracted from a value on sheet 3 which follows:

ABCDEF
1
2
3Bundle:CountProductCount
4a100011000
5b100021000
6c100031000
7d100041000
8e100051000
9f100061000
10g100071000
11h100081000
12i100091000
13j1000101000
111000
121000
131000
141000
151000
161000
171000

<tbody>
</tbody>


so back to the example before, because cell 3F on sheet 2 is 15 this would then subtract 15 from cell 4C on sheet 3.

Any help with this would be absolutely amazing, looking for a formula to plug into cells on sheet 3 to be able to do this if at all possible. Im very familiar with functions in excel and moderately familiar with VBA. Thank you in advance!
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi,

Can you use this? Just adjust the ranges to suit your data;


Book1
EFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
1DateabcdefghijDate123456789101112131415161718
202-05-1915346891011102-05-19001360014800011169
302-06-191467691111002-06-1900000014689752423
Sheet2



Book1
ABCDEFG
1
2StockQty AvailableStockQty Available
3Bundle:CountProductCount
4a1000984110001000
5b1000993210001000
6c100099031000999
7d100098741000997
8e100098651000994
9f1000982610001000
10g100098971000999
11h100098881000995
12i100099891000990
13j1000999101000984
14111000991
15121000993
16131000995
17141000997
18151000999
19161000995
20171000992
Sheet3
Cell Formulas
RangeFormula
C4=B4-SUMPRODUCT((Sheet2!$F$1:$O$1=Sheet3!A4)*Sheet2!$F$2:$O$3)
G4=F4-SUMPRODUCT((Sheet2!$S$1:$AJ$1=Sheet3!E4)*Sheet2!$S$2:$AJ$3)
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

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