+ Reply to Thread
Results 1 to 3 of 3

Generating a list with random units per sale from a list with the totals

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    9

    Generating a list with random units per sale from a list with the totals

    Hey guys,

    I have the following problem:

    There is a list with total units of sales for the different products during the month: e.g.

    Product A- 50 units
    Product B- 100 units
    Product C- 200 units

    What I need to do is generate them as a list with single sales with random units per sale. I need to be able to define the range of the units per sale (for example 1 to 4 units for Product A, 2 to 6 units for product B per sale, etc).

    So the end result would looks:

    Product A - 1 units
    Product B- 6 units
    Product A- 4 units
    Product C- 1 units
    ........etc. etc.

    And in the end, if I sum up the units in the second list, they make up the totals in the first.

    I have always been able to find solutions for divers challenges with excel, but for this one, so far I had no luck.

    Thank you in advance.

    Regards,
    Juliana

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Generating a list with random units per sale from a list with the totals

    Here is a formula that could help you.
    Please Login or Register  to view this content.
    As you did not supply us with your actual data set, I had to create one of my own.
    It might be different than yours but I needed someting to work with.
    You can take a look at the attached workbook to see how the data are structured.
    I'm sure you'll be able to modify the formula to suit your real data.
    Regards
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Generating a list with random units per sale from a list with the totals

    Hi p24leclerc,


    Thank you so much for your help! Sorry for not uploading the sheet. It works perfectly and it is exacly what I needed .


    Have a nice day.

    Kind regards,
    Yuliana

+ 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. Generating random cells from a list
    By Le_Kev in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2015, 04:27 AM
  2. Replies: 3
    Last Post: 11-22-2013, 05:06 PM
  3. Generating a list of Random numbers of random length...
    By Growl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 12:10 PM
  4. [SOLVED] Finding Values in one random list, highlighting, and labeling based on a known list
    By mark00thomas in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-14-2013, 07:41 AM
  5. macro for automatically generating a list from a list
    By SIFT-MS88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2010, 01:44 PM
  6. generating random number list?
    By planetizzie in forum Excel General
    Replies: 10
    Last Post: 10-21-2009, 11:45 AM
  7. generating a whole random # from a list
    By Arturo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2005, 07:05 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