+ Reply to Thread
Results 1 to 14 of 14

Finding the highest producing combination within a budget.

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Finding the highest producing combination within a budget.

    Hi all,

    I'm a bit of amateur with Excel, but would really appreciate any and all help with a problem I'm having.

    For a project I'm running, I have a limited budget, and am trying to find the best combination of products to choose within that budget, based on projected return.

    The products are divided into categories, and I have to choose a certain number of products from each category.

    If I were to simplify the spreadsheet I have, it would look like this:

    COLUMN A: Category 1 products
    COLUMN B: Category 1 product prices
    COLUMN C: Category 1 products' projected return
    (repeat for each product category)

    What I would like to do is find a formula or function which will enable me to ask excel, for example: "I need 1 product from category 1, 4 from category 2, and 3 from category 3, to produce the highest return within this budget. Which is the best combination of products?"

    How might I achieve this?

    Many thanks for any/all help.
    Last edited by jimmy_fowler; 09-22-2011 at 06:12 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the highest producing combination within a budget.

    Unless somebody here is going to solve the P versus NP problem* the only way to calculate the highest return is to calculate all of the possible combinations which meet your criteria.

    Depending on just how much you've simplified your problem this could be quite a major undertaking and take quite a long time to code, test and run.

    Perhaps you could give us a few more details and we can at least tell you just how horrible it's likely to be to work out an answer - are there only 3 categories? How many products are in each category? How many from each category might you want to pick?

    * Of course, there is a $1,000,000 prize for solving this, so it's not like there's no incentive to try

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Finding the highest producing combination within a budget.

    Hi,

    Where does the budget fit into the equation? Does each category/product take up a specific and different amount of your budget.

    If not then once you've chosen the minimum number of products from each category, make up the balance from the product with the highest return.

    However I think we need to know more about how your return per product is modified by your budget/cost per product before we can move further.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    09-22-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Finding the highest producing combination within a budget.

    Hi Andrew, thanks for your swift response!

    As I mentioned, I really am an Excel amateur, so I'm not sure I realised how difficult this task might be!

    In answer to your questions, there are 5 categories. The final list is still subject to change, but no more than 15 products per category. And I will need 1 product from category 1, 2 from categories 2 and 3, and 1 product from categories 4 and 5.

  5. #5
    Registered User
    Join Date
    09-22-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Finding the highest producing combination within a budget.

    In reply to Richard: there's no fixed limit to the amount of the budget each category can take up, there is just an overall budget. So it could be that almost all of the budget is allocated to one category, with the small remainder spread across the other categories, or it could be an even split - whichever offers the highest total return (based on the projections).

    Hope that made sense!

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the highest producing combination within a budget.

    I was assuming that the project has an absolute budget which can not be exceeded irrespective of the return.

    So (simplifying) if we have three type 1 items priced at $250, $500 and $1,000 and have to pick one within a $750 budget then we can exclude item #3.

    If we then have three type 2 items priced as per type 1 then we can again exclude item #3, but the inclusion/exclusion of item #2 is conditional on the type 1 item picked (or, if you prefer, the inclusion of type 1 item#2 is dependent on the type 2 item selected).

    So, if we're only picking one item from each type we have the combinations:

    Type 1, Type 2, Result
    1,1,Valid
    1,2,Valid
    1,3,Invalid
    2,1,Valid
    2,2,Invalid
    2,3,Invalid
    3,1,Invalid
    3,2,Invalid
    3,3,Invalid

    Obviously once you get into >2 types and multiple selections for each type the number of results increases exponentially.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Finding the highest producing combination within a budget.

    Hi,

    Then are you saying that the budget is not a limiting factor and that any combination of products can be considered without having to worry about any budget constraints?

    The next piece of information we need is the return for each product. Can you upload your current workbook with all the relevant products and returns.

    Regards

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the highest producing combination within a budget.

    Quote Originally Posted by jimmy_fowler View Post
    In answer to your questions, there are 5 categories. The final list is still subject to change, but no more than 15 products per category. And I will need 1 product from category 1, 2 from categories 2 and 3, and 1 product from categories 4 and 5.
    Just to give you an idea of the scale of this; reading the above as where you require 2 products from a category you required exactly 2, and not 0, 1 or 2, and excluding picking the same product twice as being a valid choice then there are over 32,000,000 possible combinations.

    Even generating that many combinations is problematic, because you can't just dump them onto a single Excel sheet for quick (?) comparison.

  9. #9
    Registered User
    Join Date
    09-22-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Finding the highest producing combination within a budget.

    Quote Originally Posted by Andrew-R View Post
    Just to give you an idea of the scale of this; reading the above as where you require 2 products from a category you required exactly 2, and not 0, 1 or 2, and excluding picking the same product twice as being a valid choice then there are over 32,000,000 possible combinations.

    Even generating that many combinations is problematic, because you can't just dump them onto a single Excel sheet for quick (?) comparison.
    Hi Andrew - this was my concern. If it's not possible, or extremely difficult, then no problem.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Finding the highest producing combination within a budget.

    Hi,

    Surely the product with the highest return is going to feature as the predominant item once you've used the products which are mandated. And where they are mandated by category you will obviously need to pick the product with the highest return.

    Or am I missing something simple here?

    Regards

  11. #11
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the highest producing combination within a budget.

    It's possible, it's probably not even that difficult to do, but each solution requires three data fields - one to hold the selected combination, one to give the budget expenditure of that combination and one to give the net yield of that combination.

    The obvious way of doing it is to loop through each possible combination and write that combination to a working sheet. With a limit of one million rows per sheet you'd end up with a sheet with ever row used for 99 columns, you'd then have to apply an algorithm to calculate the optimum solution (you can't just use a MAX of 33 columns, because there's a likelihood of tied results, in which case you'd want to use some other criteria (perhaps overall budget) to resolve the ties.

    At 1/1000th of a second for each combination you're looking at Excel churning away for getting on for 10.5 hours to calculate a result, and that's assuming that it doesn't decide to crash out because of the size of the working sheet.

    So, doable, certainly and I'd even have a crack at it, if you want, but whether it would be practical for you is really up to what you think.

  12. #12
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding the highest producing combination within a budget.

    Quote Originally Posted by Richard Buttrey View Post
    Or am I missing something simple here?
    You're missing the possibility that selecting an item of one type with a high return may exclude other high return items of other types.

    Going back to my previous example - if the $500 item of type 1 has a yield of 10, compared to 5 for the $250 item, but the type 2 $500 item has a yield of 20 then selecting the $500 item for type 1 will exclude the maximum yield scenario.

  13. #13
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Finding the highest producing combination within a budget.

    Hi,

    That's in fact what I was getting at. All that matters is the product with the highest (the OP mentioned return so I'll stick with that) return. Or if you like the highest yield.

    So the strategy should be to use the mandated products, you can't do anything but accept whatever the return is on these, and then given perfect freedom to select any other products just select the one with the highest return and ignore all others.

    I was expecting to find some constraints like for instance products having different budget costs so that the return per budget cost rather than an absolute return would have to be used, but apparently not. As far as I understand it, and I've not seen anything from Jimmy which suggests otherwise there are no other constraints.

    Regards

  14. #14
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Finding the highest producing combination within a budget.

    Perhaps Solver could be of use?

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1