+ Reply to Thread
Results 1 to 4 of 4

Number Distribution in cells

Hybrid View

sarahslc Number Distribution in cells 07-31-2013, 07:16 AM
windknife Re: Number Distribution in... 08-01-2013, 01:38 PM
sarahslc Re: Number Distribution in... 08-01-2013, 01:55 PM
windknife Re: Number Distribution in... 08-01-2013, 09:15 PM
  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Number Distribution in cells

    I have been trying to create a matrix that has a maximum of 24 slots in each window and if it exceeds the maximum it takes
    the extra slots and puts them in the next most popular window

    Before distribution Saturday
    Window 1 27
    Window 2 22
    Window 3 11
    Window 4 10
    Window 5 6
    Window 6 4
    Total 80


    After distribution Saturday
    Window 1 24
    Window 2 24
    Window 3 12
    Window 4 10
    Window 5 6
    Window 6 4
    Total 80


    I have been manually changing them, however, is there a way to make excel automatically take out the slots exceeding 24 and put them in the
    next most popular window until it has either filled all extra slots or reached 24 and moves onto the next most popular window?

    Any help would be much appreciated.

    -------------
    MODERATOR'S NOTE: Please select the correct forum for posting your questions.
    Last edited by JBeaucaire; 07-31-2013 at 12:25 PM. Reason: Moved to correct forum.

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

    Re: Number Distribution in cells

    Maybe,

    G2
    =MIN(SUM($C$2:C2)-IF(ROWS($C$2:C2)=1,0,SUM($G1:G$2)),24)
    drag down.

    See attached.

    HTH,
    WindKnife
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-31-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Re: Number Distribution in cells

    Thank you that was very helpful!

    I’m not sure how many windows will exceed the limit or which cells will exceed it and how to distribute the excess orders across windows before and after that window depending on popularity. Would it have anything to do with ranking by popularity to distribute?


    Before distribution Saturday
    Window 1 6
    Window 2 22
    Window 3 11
    Window 4 29
    Window 5 6
    Window 6 25
    99

    After distribution Saturday
    Window 1 6
    Window 2 24
    Window 3 15
    Window 4 24
    Window 5 6
    Window 6 24
    99
    Last edited by sarahslc; 08-01-2013 at 01:58 PM.

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

    Re: Number Distribution in cells

    Use three help columns to solve it.

    G2
    =RANK(C2,$C$2:$C$7)+COUNTIF($C$2:C2,C2)-1
    H2
    =SUMIF($G$2:$G$7,ROWS($G$2:G2),$C$2:$C$7)
    I2
    =MIN(SUM($H$2:H2)-IF(ROWS($H$2:H2)=1,0,SUM($I1:I$2)),24)
    J2
    =INDEX($I$2:$I$7,G2)
    Drag those down. See attached.

    HTH,
    WindKnife
    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: 3
    Last Post: 08-05-2012, 05:47 PM
  2. Number distribution
    By dabeam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2010, 10:20 AM
  3. Replies: 6
    Last Post: 12-05-2008, 02:31 PM
  4. how can I sample a number from a distribution?
    By roy in forum Excel General
    Replies: 2
    Last Post: 09-07-2005, 07:05 PM
  5. Log distribution random number generator
    By cameron mcintyre in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2005, 07: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