+ Reply to Thread
Results 1 to 7 of 7

Allocate a total to 10 people based on shares

  1. #1
    Registered User
    Join Date
    04-02-2024
    Location
    Ireland
    MS-Off Ver
    Office 365
    Posts
    6

    Allocate a total to 10 people based on shares

    Hi,

    I am looking to get a formula to split the amount in b12 evenly between 6 people on full share and split it between 4 others on 50% shares. Total of all splits should equate to the amount in b12 cell. For other events split will be different.

    Could someone help with this?

    Thanks,
    Jtom2024

    Administrator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #1 requires good titles. "Formula Help" doesn't tell us anything about your question. I have updated it for you this time because you are a new member. --6StringJazzer
    Attached Files Attached Files
    Last edited by 6StringJazzer; 04-02-2024 at 12:53 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Allocate a total to 10 people based on shares

    You don't say who will get 100% and who will get 50%.

    This solution is hard-coded for exactly what you asked for. If you are going to vary the 6/4 distribution then you will need a more comprehensive solution.

    EDIT: Removed attachment, see subsequent post with more general solution.
    Last edited by 6StringJazzer; 04-02-2024 at 01:09 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Allocate a total to 10 people based on shares

    Please update your profile to show the actual Excel version (2016, 365, etc.). The number "16" does not tell us what functionality you have available.

    I noticed you did say that the split may change. Here is a more general solution using functions available in MS 365. Note that results have been rounded to two decimal points so you are going to have rounding errors for some values.

    =ROUND($B12*MAKEARRAY(1,SUM($C12:$D12),LAMBDA(r,c,IF(c<=$C12,$C$11,$D$11)))/SUMPRODUCT($C$11:$D$11,$C12:$D12),2)
    Attached Files Attached Files
    Last edited by AliGW; 04-20-2024 at 01:18 AM. Reason: Formula added.

  4. #4
    Registered User
    Join Date
    04-12-2024
    Location
    Canada
    MS-Off Ver
    O365
    Posts
    14

    Re: Allocate a total to 10 people based on shares

    Hi admin,

    can you please clarify what r and c in your formula? for my understanding

    =ROUND($B12*MAKEARRAY(1,SUM($C12:$D12),LAMBDA(r,c,IF(c<=$C12,$C$11,$D$11)))/SUMPRODUCT($C$11:$D$11,$C12:$D12),2)
    Last edited by Friend1; 04-19-2024 at 11:45 PM. Reason: grammer mistake

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Allocate a total to 10 people based on shares

    Try in E12, =$B12/($C$11*$C12+$D$11*$D12)*IF(COLUMNS($E$11:E$11)<=$C12,$C$11,IF(COLUMNS($E$11:E$11)<=$C12+$D12,$D$11,0)), copy across and down.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,214

    Re: Allocate a total to 10 people based on shares

    can you please clarify what r and c in your formula? for my understanding
    Parameters for rows and columns in the array.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    04-12-2024
    Location
    Canada
    MS-Off Ver
    O365
    Posts
    14

    Re: Allocate a total to 10 people based on shares

    Thanks AliGW

+ 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: 5
    Last Post: 02-16-2018, 06:50 AM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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.6.0 RC 1