Help: I need a formula to help me allocate Bourbon allocation

BigPerm79

New Member
Joined
Apr 28, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Good day!

I keep running into a problem that I need help with. I work for a liquor distributor and am building a spreadsheet to automatically allocates highly sought-after items based on account level criteria. I have a clip of the spreadsheet below.

1682694725893.png


Here is what I need:
1) Create a formula that allocates the available units for each customer (F1*A4), but stop allocating when the "initial allocation" achieved.
2) All allocations must be a whole number
3) The total allocations can not be larger than the initial allocation in Row 1

When I use =round(F1*A4), the total allocated is less than the initial allocation
When I use =RoundUp(F1*A4,0) the total allocated ends up being 4x larger than the initial allocation.

Any help is much appreciated.
BigPerm79
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
You refer to column and rows, yet we cannot determine from your picture which those are. Please reload your sample file using XL2BB so that we don't have to recreate the file you already have. We cannot manipulate data in a picture.
 
Upvote 0
Sorry, this is a work computer and I can not download XL2BB. I tried but it wouldn't let me. I saved the file into a box.com account.

Here is a link to the file: Box
 
Upvote 0
You refer to column and rows, yet we cannot determine from your picture which those are. Please reload your sample file using XL2BB so that we don't have to recreate the file you already have. We cannot manipulate data in a picture.
Sorry I tried to download that but I couldn't because I am on a work computer. Please access the file from this link: Box
 
Upvote 0
Ok. Try this formula and see if it works. Cannot test beyond your sample so i don't know if it will come out to 85.

=IF(MOD($F$1*A5,1)>=$F$1*A5,ROUNDUP($F$1*A5,0),ROUND($F$1*A5,0))

Basically, if the calculation is greater than .5 then it rounds up otherwise it rounds down.
 
Upvote 0
Just tested my formula above on your Box.net file . FAIL!!! Back to the drawing board.
 
Upvote 0
You seem to be trying to allocate little stock amongst too many customers?
You have 85 units amongst 368 customers.

If any one customer only had one unit then only 85 customers could be satisfied but there are customers
who will be allocated 2 units so the number of customers who are allocated any stock at all reduced.

If you are allocating from the top and stopping when you run out of stock then the customers need
to be sorted by the % allocated in a descending order.
 
Upvote 0
You seem to be trying to allocate little stock amongst too many customers?
You have 85 units amongst 368 customers.

If any one customer only had one unit then only 85 customers could be satisfied but there are customers
who will be allocated 2 units so the number of customers who are allocated any stock at all reduced.

If you are allocating from the top and stopping when you run out of stock then the customers need
to be sorted by the % allocated in a descending order.
yes, I need it to stop allocating once it hits the max available. Once the total is gone, the rest of the customers are SOL. :) This happens often in my industry often because demand on some items is higher than the availability. The only fair way to allocate is to rank the customer on separate metrics (how they perform with the other products) which is why I have an allocation %.
 
Upvote 0
Put this formula into F4 - T4
=ROUNDUP(F$1*$A4,0)

and this formula into F5 to F428 and copy across to column T.
=IF((SUM(F$4:F4)+ROUNDUP(F$1*$A5,0))>F$1,0,ROUNDUP(F$1*$A5,0))

The total of each column, row 4 downwards, should be the Initial Allocation figure for the column.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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