+ Reply to Thread
Results 1 to 9 of 9

Distribution options?

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Question Distribution options?

    I've run into a bit of problem, trying to figure out how to distribute products over different intervals with a simple formula.
    So i'm hoping for some ideas how to tackle this problem.

    The idea is that an number of products can be sent out a day. And they can arrive according to a distribution schedule.
    Say product X will be sent out in batch and it will arrive on different days. The first day 60%, 2nd 25%, 3rd 10% and 4th 5%.
    The next day you'll have another batch doing the same distribution.
    For another product this might be a different distribution. And distributions can take up to several weeks.

    I've added an example file for reference. The result part in the file is what the result should look like. But the formula is too labour intensive for changes or other products.

    I've tried a matrix, but if it had 70 intervals, and several different products. It got too complex.
    How would you tackle this? It feels like a complex problem, but the solution might be simple.
    I'm hoping for a solution for with different distributions. But if you have a great idea with a single distribution schedule for different products i'm open to that suggestion.

    All suggestions are appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Distribution options?

    Okay, you'll need to modify your sheet a bit to make the tricky formula less complex.
    1. Insert enough columns so that your tables start in column I (i.e. 'Sales' should now be in cell I2). You can hide these empty columns if you wish.
    2. In cell J23 (where your 300,000 is) enter this formula:
    =SUMPRODUCT(N(OFFSET(A3:J3,,{9,8,7,6,5,4,3,2,1,0},1,1)),$J12:$S12)
    3. Drag that formula across to S23 and then down to S27

    I see that you may wish to add more columns. The formula above would need to be adjusted. For example the {9,8,7...0} array would need to expand. You could do that with something like 10-COLUMN($A:$J), but I thought that may add too much confusion as I wanted you to be able to understand how it works (use 'Evaluate Formula') so that you could expand it in the future. Alternatively, you could create a reversed Sales table and use a shifting array to use that to multiply against your percentages. I started going down that path, but it would be harder to explain and adding the blank columns seemed easier.
    Last edited by Pauleyb; 05-11-2015 at 03:44 PM.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Distribution options?

    Thanks for the suggestion. It works well, but it not as flexible as I would like (yet).

    Is there any way to set the offset part in the formula as a reference? In my localized version of excel it looks a bit different.
    {9\8\7\6\5\4\3\2\1\0}

    Say would it be possible to reference the first one as {0} in a different cell (J21), the second as {1\0} (in J22), etc etc.
    I tried using the INDIRECT function but that didn't work.

    I'm also curious how you would use a reversed Sales table and the shifting array. Would that be a more flexible option?
    Last edited by Sthlm; 05-12-2015 at 08:19 AM.

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Distribution options?

    This uses the reversed sales table method (which then removes the need of the 'filler columns' in front); however, it does need to have the 9 cells to the right of the reversed sales table to be unused, and that 9 would increase as your table adds more columns.
    1. I inserted a enough rows for the reverse table. Mine is located at B8:L13 and the 'Distribution' cell is now at B15.
    2. In C8 type this formula (the result should be X+9):
    =INDEX($C2:$L2,COLUMNS($C2:$L2)-COLUMN(A:A)+1)
    3. Drag that formula to fill your reverse sales table
    4. In C27 (it should have your 300,000 number in it) insert this formula:
    =SUMPRODUCT(OFFSET($L9,,SUM(COLUMN($C:$C)-COLUMN(C:C)),1,COLUMNS($C$9:$L$9)),$C16:$L16)
    5. Drag that formula to fill you Result table

    Rather than hardcoding the {9,8,7...0} I used the COLUMNS and COLUMN formulas to create the same array, but those used ranges will need to be changed manually, or, if you are tricky, with dynamic named ranges.

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Distribution options?

    Pauley,

    Thanks for the suggestions! I haven't been able to play around with the last one yet. But i'll definately give it a try.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Distribution options?

    C23=iferror(sumproduct(subtotal(9,offset($c12,0,row(indirect("1:"&min(columns($c23:c23),count($c12:$l12))))-1))*subtotal(9,offset(c3,0,-row(indirect("1:"&min(columns($c23:c23),count($c12:$l12))))+1))),0)
    Please Login or Register  to view this content.
    try the above formula and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Distribution options?

    Thanks that works even better!

    It saves time when if the distribution intervalt need to be extended. And there is don't need to teach someone how to use the document.

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Distribution options?

    you are welcome and thanks for adding reputation

  9. #9
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Distribution options?

    Nflsales,

    I've run into a 'bug'. Say for instance my distribution doesn't start at X but at X+1, i will get incorrect data. The same issue arrises when in skip one X interval. Skipping 2 intervals yields no results at all.
    It's is solved by adding a 0%. But i'd like to make it foolproof, as i'm not the only one to work with this document.

    Any idea how to fix that? I've tried a few things but no luck.

+ 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. Plotting F Distribution Probability Distribution Function
    By diggetybo in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-23-2015, 01:36 PM
  2. Replies: 0
    Last Post: 08-26-2014, 08:44 AM
  3. Replies: 3
    Last Post: 08-05-2012, 05:47 PM
  4. extracting text string with 2 options @ end & limited options
    By ChristianR in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-24-2010, 06:51 AM
  5. [SOLVED] How to diasble the 'Tools - Options - View - Comments' options?
    By Alan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2005, 07: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