Divide whole numbers across multiple cells with variable

L

Legacy 386498

Guest
Hi all,

I need to solve a problem of dividing whole numbers in excel based on these variable:

Company AA can only sale to company A and the quantity bought and sold is always the same. In this example 44 000. Company A1 can receive 6000 from AA1 and 9000 from AA2 or 15000 from AA1, etc. That doesn't matter.
Company BB can only sale to company B, but the quantity bought and sold is always different, so company always need to buy externally to compensate. In this example, 13 000 sold and 18 000 bought, so 5000 bought externally.
Company CC to FF can sale to any company from C to F. The goal here is for CC to sell has much as possible to C, DD to D, EE to E and FF to F. When not possible, sell from one to another and keeping the quantity bought and sold externally to a minimum. In this example, CC can sell 8000 to C and 2000 to D.

What can I do to solve this problem with excel? I've read online about excel solver, is there anything else? Is it the best solution for me?

Thanks in advance.


CompanyCapacity soldA1A2A3B1B2C1D1E1F1External
Capacity bought15000100001900010000800080007000200007000
AA125000
AA29000
AA310000
BB17000
BB26000
CC110000
DD15000
EE125000
FF18000
External

<tbody>
</tbody>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I'm not sure I understand the constraints.

You say the goal is for CC to sell as much as possible to C and when that's not possible, sell to someone else the minimum possible. But under what conditions is it not possible for CC to sell to C? And what do you mean "minimum"?
Also, company B bought 5,000 externally. Why 5,000? What are they trying to meet? What are the conditions? And does that action play into what companies CC:FF & C:F are doing?

Please tag me when you respond
 
Last edited:
Upvote 0
I'm not sure I understand the constraints.

You say the goal is for CC to sell as much as possible to C and when that's not possible, sell to someone else the minimum possible. But under what conditions is it not possible for CC to sell to C? And what do you mean "minimum"?
Also, company B bought 5,000 externally. Why 5,000? What are they trying to meet? What are the conditions? And does that action play into what companies CC:FF & C:F are doing?

Please tag me when you respond

Company B bought 5 000 externally, because B can only buy from BB. BB has 13 000 to sell (6 000 + 7 000) and we need to full B with 18 000 (10 000 + 8 000), so B will buy/transfer 13 000 from BB and 5 000 externally to max out the number they can buy (18 000). So they're trying to meet the max capacity bought (same for every company).

Company CC can sell 10 000 to C, but C can only buy 8 000, they don't have the capacity to buy more, so CC can still sell 2 000 to D, E and/or F. The goal here is for company AA to FF to sell everything to/full company A to F internally. When that's not possible, they will sell externally. Or the contrary can happen where A to F can buy more than company AA to FF can sell internally, so they will buy the difference externally. That's what I mean by keeping the quantity bought and sold externally to a minimum.

I hope this makes more sense, don't hesitate if something isn't clear.
 
Last edited by a moderator:
Upvote 0
I can't think of a way to solve this "problem" in excel. I feel like its as simple as saying "Has BB sold all of it's capacity to B?" if yes, then B buys the rest externally. I don't see there being anything complicated to solve. This should be built into the ordering software you use. That's my only thought.
 
Upvote 0
I can't think of a way to solve this "problem" in excel. I feel like its as simple as saying "Has BB sold all of it's capacity to B?" if yes, then B buys the rest externally. I don't see there being anything complicated to solve. This should be built into the ordering software you use. That's my only thought.

The problem is I don't have an ordering software, only excel. Thanks for taking the time 'tho.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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