+ Reply to Thread
Results 1 to 11 of 11

Thread: Funding allocation with maximum values

  1. #1
    Registered User
    Join Date
    01-05-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    7

    Funding allocation with maximum values

    Hi,

    When I took on this project I thought it would be simple, but this part is stumping me. I have a spreadsheet which I would like to allocate total funding evenly (i.e., the average) to each of the user-selected active categories (which are selected by putting "1"s in the appropriate column). However, if the average share of the total funding exceeds the maximum allowed amount, it just allocates the maximum and distributes the difference to the rest of the categories. I know that was worded a bit strangely, so just ask if i was unclear.

    Thank you very much!
    Attached Files Attached Files
    Last edited by blinkzorg; 01-09-2012 at 08:13 PM.

  2. #2
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,352

    Re: Funding allocation with maximum values

    blinkzorg,

    Welcome to the forum!
    In cell F5, use this formula:
    =IF(SUM($F$4:F4)=$B$1,0,B5*MIN(E5,($B$1-SUM($F$4:F4))/SUM(B5:$B$13)))

    And then copy down
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: Funding allocation with maximum values

    I think you need to explain this in a bit more detail. What are the "units" in your file? Are you allocating units or money? How is your average to be worked out? So many things I don't understand !!

    Pete

  4. #4
    Registered User
    Join Date
    01-05-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Funding allocation with maximum values

    Quote Originally Posted by tigeravatar View Post
    blinkzorg,

    Welcome to the forum!
    In cell F5, use this formula:
    =IF(SUM($F$4:F4)=$B$1,0,B5*MIN(E5,($B$1-SUM($F$4:F4))/SUM(B5:$B$13)))

    And then copy down
    Thanks for the welcome and the suggestion, tigeravatar. It works for the first cell, but when I copy it down, it adds up to more than the total amount allocated!

    Quote Originally Posted by Pete_UK View Post
    I think you need to explain this in a bit more detail. What are the "units" in your file? Are you allocating units or money? How is your average to be worked out? So many things I don't understand !!

    Pete
    Sorry for not being clear, Pete. So this is how it's supposed to work:

    We start with the total allocated amount of funding (B1). This is the total amount to be distributed among the various categories below, to buy a certain number of units of each category. Ideally, I would like the user to be able to select which categories to include in the calculation by entering a 1 or a 0 in column B.

    The "units" themselves are not actually important, just the money. In fact you can basically ignore the unit cost and cost per unit and just focus on the "Maximum Allocation" column. What I want to do is allocate funding from the total in B1 to each category with a "1" in the "Active" column. There's no priority for each category, so initially I want it to divide the total evenly among each category. For example, there are three active categories on the spreadsheet. Dividing the total funding into three, we have $6,566,667 allocated each to Categories 1, 2, and 5. But notice that this is a larger amount than the maximum allocation amount for category 1, $4,898,560. So I want $4,898,560 to appear in cell G5, and the difference allocated evenly among the remaining active categories. Does that make sense?

  5. #5
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: Funding allocation with maximum values

    I've attached a file that does this as an iterative process using multiple columns. The initial allocation (column I) will ensure that no allocation exceeds the maximum allowed, but of course, this means that there may be some remaining funds which need to be allocated. The next iteration (column J) thus takes the remaining funds and adds them to the initial allocations, ensuring that no one alloction exceeds the maximum. In the example, the iteration stops there as all money has been distributed, but if one or more of the categories which received a second allocation then achieved the maximum allowed, there would still be some remaining money to be distributed. The formulae in column J (i.e. J4 to J13) are copied across into K4:K13 (and indeed could be copied further if the need arose, that is if the value in the cell on row 4 is not zero) in order to test for another iteration. In the example the values in column J are the same as those in column K, so no further iterations are required.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    01-05-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Funding allocation with maximum values

    That's what I was thinking, that the allocation has to be iteratively determined, but I didn't know how to go about doing it... However, it seems like you forgot to attach the file!

  7. #7
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: Funding allocation with maximum values

    No, the forum didn't let me and has crashed on me several times today. I'll try attaching it to this.

    Pete

    EDIT: It seems to have allowed it this time.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-05-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Funding allocation with maximum values

    The file doesn't seem to work, even though I can download my own file from the initial post. perhaps you could send it via e-mail? androido42 [at] hotmail.com

  9. #9
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: Funding allocation with maximum values

    File sent. I'll also try re-attaching it here.

    Pete
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,352

    Re: Funding allocation with maximum values

    blinkzorg,

    Quote Originally Posted by blinkzorg
    Thanks for the welcome and the suggestion, tigeravatar. It works for the first cell, but when I copy it down, it adds up to more than the total amount allocated!
    F5 gets 4,898,560.00
    F6 gets 7,400,742.00
    F9 gets 7,400,720.00

    When added up, they equal 19,700,000.00, which is exactly the total amount allocated in cell B1


    Quote Originally Posted by blinkzorg
    So I want $4,898,560 to appear in cell G5
    Oh, I see the problem. You need the formula in G5, not F5. Use this slightly modified formula then in G5 and copy down:
    =IF(SUM($G$4:G4)=$B$1,0,B5*MIN(E5,($B$1-SUM($G$4:G4))/SUM(B5:$B$13)))
    Attached Files Attached Files
    Last edited by tigeravatar; 01-06-2012 at 10:57 AM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  11. #11
    Registered User
    Join Date
    01-05-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Funding allocation with maximum values

    Sorry for the delay! Thank you both very much, both of your methods worked like a charm!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0