I have a table that contains data for storage locations of 15 different sizes (30 units, 60 units, 90 units, etc.). There is a column for location size with the number of units the location will hold (column A), a column for the number of actual locations (column B), and a column for the number of locations needed based on the velocity of the items in inventory (column C). I need to add a column (D) that will allocate the number of needed locations up or down based on whether the number of actual locations (column B) is either zero or greater than zero. This will allow me to toggle location sizes "on" and "off" while still distributing the number of items across the table. It is okay if the number of items exceed the number of actual locations as long as the number of actual locations is greater than zero.
Here is the data:
Col A: 30,60,90,180,360,720,1080 (UNITS)
Col B: 0,1,1,2000,1400,0,378 (ACTUAL LOCATIONS)
Col C: 80,710,5607,664,530,394,79 (LOCATIONS NEEDED)
In D:1 this formula works:
=IF($B2>0,$D2,0)
And in D:2 either of these work:
=IF(B3=0,0,IF(B2=0,SUM(D2:D3),D3))
=IF($B3>0,SUM(D3,SUMPRODUCT((units<A4)*(TOGGLE=0)*(LOCATIONS))),0)< p>
But when I get to D:3 and above I am stuck, because when B:2 is zero and other locations are 1 or greater, my formulas keep picking up the zeros further back. Surely there is a simple solution or array formula to solve this problem. The ultimate goal is to build a model that will allow me to look at different scenarios with different sets of actual location sizes and know how many I would need of each based on velocity (locations needed).
I hope this is clear...
Edited to add:
I cannot get my sumproduct formula to write to this message board - it keeps chopping it off, one more time here goes...
=IF($B3>0,SUM(D3,SUMPRODUCT((units<A4)*(toggle=0)*(locations))),0)
Here is the data:
Col A: 30,60,90,180,360,720,1080 (UNITS)
Col B: 0,1,1,2000,1400,0,378 (ACTUAL LOCATIONS)
Col C: 80,710,5607,664,530,394,79 (LOCATIONS NEEDED)
In D:1 this formula works:
=IF($B2>0,$D2,0)
And in D:2 either of these work:
=IF(B3=0,0,IF(B2=0,SUM(D2:D3),D3))
=IF($B3>0,SUM(D3,SUMPRODUCT((units<A4)*(TOGGLE=0)*(LOCATIONS))),0)< p>
But when I get to D:3 and above I am stuck, because when B:2 is zero and other locations are 1 or greater, my formulas keep picking up the zeros further back. Surely there is a simple solution or array formula to solve this problem. The ultimate goal is to build a model that will allow me to look at different scenarios with different sets of actual location sizes and know how many I would need of each based on velocity (locations needed).
I hope this is clear...
Edited to add:
I cannot get my sumproduct formula to write to this message board - it keeps chopping it off, one more time here goes...
=IF($B3>0,SUM(D3,SUMPRODUCT((units<A4)*(toggle=0)*(locations))),0)
Last edited: