+ Reply to Thread
Results 1 to 2 of 2

return a random name from a list of grouped names based on speicifc percetages applied.

Hybrid View

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    New Jersey, Jersey City
    MS-Off Ver
    Excel 2010
    Posts
    1

    return a random name from a list of grouped names based on speicifc percetages applied.

    Hi There,

    I have been stuck on this issue for a while, I would be grateful if someone could help.

    I have a list of counties allocated to their states. There are a number of names which are allocated to counties, and more than one name can be allocated to a county. To top this of, each name has a certain percentage attached to it. What I have done so far is

    allocated each state to a county, so that if a state is chosen in a drop down list, then only those counties associated to that state will appear in the drop down list in the cell next to it.

    managed to write a piece of code to find the counties in the column which are equal, and randomly select from those names associated to that county - I now need to extend this so that it randomly selects a name according to the percentage allocated to each name (so for example, the state of NJ may have 5 entries of Bergen - with each entry of Bergen allocated to a different name and different percentage).

    I hope this makes sense.

    I have copied the initial table below

    State County Percentage Name
    NJ Bergen 25% Mihir
    NJ Bergen 25% Tom
    NJ Bergen 25% John
    NJ Bergen 25% Jack
    NJ Bergen 0 Wayne
    IL Chicago 25% Angela
    IL Chicago 25% Sam
    IL Chicago 25% Chris
    IL Chicago 25% Raj
    IL Chicago Suburbs 50% Cassie
    IL Chicago Suburbs 50% Ash
    DC Washington 25% Vivian
    DC Washington 25% Natasha
    DC Washington 15% Reena
    DC Washington 25% Tina
    DC Washington 10% Louise

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: return a random name from a list of grouped names based on speicifc percetages applied

    Welcome to the forum.
    Thank you for joining, since you have created a new thread in the proper subforum this thread will not be moved.
    Thanks.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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