"Givers have to set limits because takers rarely do." [Irma Kurtz]
Suppose your company is in the middle of its annual process to plan its revenues and expenses. You are head of a division with 6 departments (A to F). Your department heads requested 2000, 1900, 2000, 2000, 600 and 2000 € but you only got a budget of 9000 € from your company.
Your departments' weighted contributions to your company's revenues are 30%, 20%, 15%, 15%, 10% and 10%.
How do you distribute your budget? You surely would not give them more than they have asked for...
The proposed solution with Excel © VBA (please read my disclaimer):