+ Reply to Thread
Results 1 to 7 of 7

maximize price for given consumption in a supply portfolio

  1. #1
    Registered User
    Join Date
    09-29-2023
    Location
    greece
    MS-Off Ver
    Excel version 2206
    Posts
    3

    maximize price for given consumption in a supply portfolio

    In the attached excel, each row is a supply of specific price and quantity. I need a formula that will automatically find the maximum prices and maximize the total price, given that there is a limit of 230.000 units in the quantity that can be absorbed from the total of 276.000.

    I.e. lets say that a customer consumed 230.000 units of quantity. If I want to maximize the cost of the customer, I would first choose the supply in row 14 (with price 33) so that I now have included 21.000 units. Then I will include the quantity with the next highest price (row 10). The formula must understand that the same price can be found in more than one instance in the table. I note this because some formulas i've tried, calculated the first instance of a double occurance two times, and left the second quantity out of the calculation.

    Folowing that rule, at some point I will have added rows 2,3,6,7,10,11 and 14, which correspond to 186.000 units of quantity. I need 230.000 - 186.000 = 44.000 more, which should be added from the row with the next highest price (row 4, price 27).

    Finally the calculation that I need to take place is the following:
    (33*21000 + 32*23000 + 31*10000 + 30*19000 + 29*29000 + 28*43500 + 28*40500 + 27*44000) / 230000 = 29,09

    Please note that some rows might be blank. Take this into account so that the formula does not return #n/a message or otherwise.

    Thanks,
    Titus
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: maximize price for given consumption in a supply portfolio

    Try this

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: maximize price for given consumption in a supply portfolio

    Another way:

    Please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-29-2023
    Location
    greece
    MS-Off Ver
    Excel version 2206
    Posts
    3

    Re: maximize price for given consumption in a supply portfolio

    Thanks, it worked!

  5. #5
    Registered User
    Join Date
    09-29-2023
    Location
    greece
    MS-Off Ver
    Excel version 2206
    Posts
    3

    Re: maximize price for given consumption in a supply portfolio

    Following on the previous message, is there a forumula that will produce a table with 3 columns (i.e. item, quantity, price) based on the same maximazation principle?
    Thanks in advance.
    Titus
    Attached Files Attached Files

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: maximize price for given consumption in a supply portfolio

    One way:

    Please try:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: maximize price for given consumption in a supply portfolio

    Another way,

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2020, 05:29 AM
  2. Replies: 1
    Last Post: 03-11-2020, 06:56 PM
  3. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  4. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  5. Maximize one Form Cause Maximize the Other Forms
    By herukuncahyono in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2009, 01:05 AM
  6. pet supply carealot
    By Zarekylin75 in forum Excel General
    Replies: 1
    Last Post: 09-15-2006, 04:35 AM
  7. [SOLVED] How to supply your own web query
    By Mark Stephens in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2005, 03:05 AM

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