+ Reply to Thread
Results 1 to 8 of 8

Distribute number based on score

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Distribute number based on score

    Hi,

    Please see the attached excel doc. I am trying to distribute the total number of sessions (cell H1) across the groups in column A based on the score of each group (column D). The number of sessions a group receives cannot exceed the max (cell H2) or be less than the min (cell h3).

    Is it possible to do this sort of thing using formulas? If not VBA?

    Thanks

    Ant
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Distribute number based on score

    Perhaps it might help if you could manually produce the desired results and explain how you arrived at those figures.
    Remember, what you're trying to achieve here makes perfect sense to you, but this is the first time any of us have seen this and we're unaware of the full workings.

    BSB.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Distribute number based on score

    Each group must receive at least 20 sessions, and no more than 40, and the total number of sessions must be 221?

    Given that there are 11 groups, that's a minimum of 220 sessions without considering the score, leaving one to allocate.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Distribute number based on score

    OK. Essentially I want column E (Sessions) to be populated with a number between 20 and 40 based on the value in column D (Score). Higher values in the Score column should result in a higher value in the Sessions column and vice versa. The total of the values in Sessions column needs to be equal to the value in cell H1 i.e. 221.

    The purpose is that I have so many sessions (221) to provide to the different groups (column A) and I want to distribute the sessions based on need. Groups with a higher score (column D) need more sessions, groups with a lower score need less sessions. The extra criteria is that there is a minimum and a maximum number of sessions that each group is allowed.

    Does that make more sense?

  5. #5
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Distribute number based on score

    Thanks for pointing that shg - I should have paid more attention when creating the dummy data. Apologies.

    Imagine the minimum is 10 and the maximum is 30.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Distribute number based on score

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Group
    %
    Rank
    Score
    Allocated
    Total
    Sessions
    221
    2
    AA
    28
    9
    82%
    15.0
    25.0
    Max
    30
    3
    BB
    30
    6
    55%
    10.0
    20.0
    Min
    10
    4
    CC
    46
    3
    27%
    5.0
    15.0
    Allocate
    111
    I4: =I1 - ROWS($A$2:$A$12) * I3
    5
    DD
    38
    5
    45%
    9.0
    19.0
    6
    EE
    30
    6
    55%
    10.0
    20.0
    E2 and down: =MIN($I$2 - $I$3, ROUND(D2 / ($D$14 - SUM(D$1:D1)) * ($I$4 - SUM(E$1:E1)), 0))
    7
    FF
    51
    2
    18%
    3.0
    13.0
    F2 and down: =E2 + $I$3
    8
    GG
    25
    10
    91%
    17.0
    27.0
    9
    HH
    21
    11
    100%
    19.0
    29.0
    10
    II
    29
    8
    73%
    14.0
    24.0
    11
    JJ
    43
    4
    36%
    7.0
    17.0
    12
    KK
    56
    1
    9%
    2.0
    12.0
    13
    14
    591%
    111.0
    221.0
    Last edited by shg; 05-14-2014 at 02:05 PM.

  7. #7
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Distribute number based on score

    Wow, that is exactly what I needed. Thanks shg!

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Distribute number based on score

    You're welcome.

+ 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: 02-19-2014, 06:02 AM
  2. [SOLVED] Formula to return score of 0-100 based on column of number data?
    By theronager in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-22-2013, 06:45 PM
  3. Compute total score based on student number
    By sinth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-28-2012, 02:55 AM
  4. Pulling test score based on date, not highest score.
    By PowerSchoolDude in forum Excel General
    Replies: 2
    Last Post: 12-01-2009, 06:42 PM
  5. Converting a Number score to an equivalent Letter score
    By cgurr1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2008, 12:42 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