Formula to Distribute Values in a Table (Model)

BanjoMan

New Member
Joined
Aug 18, 2011
Messages
1
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)
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

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