Cell reference

leebauman

Board Regular
Joined
Jul 1, 2004
Messages
194
Office Version
  1. 365
Platform
  1. Windows
My model contains daily inventory data (begin inventory less sales = end inventory)

I can manipulate the number of days to restock

I want a formula in B "Start Inventory" which references G "Restock Order Qty", but the restock quantities only add to inventory the number of restock days after the restock order is placed.

In this example on day 2 end inventory is (80) but is projected to fall below zero before the restock period (4 days). So the model flags that a restock order needs to be placed on day 2. I need the (50) restock items to add to inventory (4) days later (day 6).

So, day 6 starts with day 5's end inventory (10) and the (50) restock items from day 2 are received, leading to total day (6) starting inventory being (60).

Book1
ABCDEFG
1Restock Days4
2Restock Qty50
3
4DayStart InventorySales End InventoryRestock period rolling salesProjected InventoryRestock Order Qty
511005958510 
6295158085-550
7380206075-15 
8460352550-25 
9525151040-30 
1066015453510 
1174510352510 
1283510251510 
139255201010 
1410201010010 
Sheet1
Cell Formulas
RangeFormula
D5:D14,F5:F14D5=B5-C5
E5:E14E5=SUM(TAKE(C6:C14,$B$1))
G5:G14G5=IF(AND(F5<=0,F4>0),$B$2,"")
B6:B9,B11:B14B6=D5
B10B10=G6+D9


Appreciate any help. Thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try the below:
Book1
ABCDEFGH
1Restock Days4
2Restock Qty50
3
4DayStart InventorySalesEnd InventoryRestock period rolling salesProjected InventoryRestock Order Qty
511005958510 
6295158085-550
7380206075-15 
8460352550-25 
9525151040-30 
1066015453510 
1174510352510 
1283510251510 
139255201010 
1410201010010 
15
Sheet1
Cell Formulas
RangeFormula
D5:D14,F5:F14D5=B5-C5
E5:E14E5=SUM(TAKE(C6:C14,$B$1))
G5:G14G5=IF(AND(F5<=0,F4>0),$B$2,"")
B10:B14B10=IF(OFFSET(B10,-4,5)<>"",OFFSET(B10,-4,5)+D9,D9)
 
Upvote 0
Solution
Works perfectly. Much appreciated!
If so, then wouldn't this simple non-volatile option for column B also work?

23 11 19.xlsm
ABCDEFG
1Restock Days4
2Restock Qty50
3
4DayStart InventorySalesEnd InventoryRestock period rolling salesProjected InventoryRestock Order Qty
511005958510 
6295158085-550
7380206075-15 
8460352550-25 
9525151040-30 
1066015453510 
1174510352510 
1283510251510 
139255201010 
1410201010010 
Inventory
Cell Formulas
RangeFormula
D5:D14,F5:F14D5=B5-C5
E5:E14E5=SUM(TAKE(C6:C14,$B$1))
G5:G14G5=IF(AND(F5<=0,F4>0),$B$2,"")
B6:B14B6=SUM(D5,G2)


Or if you want to relate it to the value in B1 ..

23 11 19.xlsm
ABCDEFG
1Restock Days4
2Restock Qty50
3
4DayStart InventorySalesEnd InventoryRestock period rolling salesProjected InventoryRestock Order Qty
511005958510 
6295158085-550
7380206075-15 
8460352550-25 
9525151040-30 
1066015453510 
1174510352510 
1283510251510 
139255201010 
1410201010010 
Inventory (2)
Cell Formulas
RangeFormula
D5:D14,F5:F14D5=B5-C5
E5:E14E5=SUM(TAKE(C6:C14,$B$1))
G5:G14G5=IF(AND(F5<=0,F4>0),$B$2,"")
B6:B14B6=SUM(D5,IF(ROW()>B$1,INDEX(G:G,ROW()-B$1),0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
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