+ Reply to Thread
Results 1 to 3 of 3

Complex random name generation from lists

  1. #1
    Registered User
    Join Date
    05-25-2013
    Location
    Toronto, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Complex random name generation from lists

    I'd like to think I know what I'm doing in excel 2010, but this one is a bit more than I can chew. Any help would be appreciated.

    I'm playing a pirate game... not very professional, but still a spreadsheet related question

    I have a complex list of names and ranks and sometimes, during a battle, some of the (fictional) crew get hurt or killed (to be clear - it's a game, no one gets hurt in real life, it'd be just my luck the NSA was listening in on me). I want to be able to enter the number of casualties and have a random list come up.

    There are 4 ranks of crew members, and each rank has a list of names.

    rank 1 has a 10% chance of being hurt
    rank 2 has a 15% chance of being hurt
    rank 3 has a 25% chance of being hurt
    rank 4 has a 50% chance of being hurt

    So if the number of people hurt is 10, I would like to be able to input 10 and this formula will figure out how many in which rank, then figure out randomly from that rank who was hurt.

    Example

    I input 10 casualties, the formula figures out the following:

    1 casualty from rank 1 - generate 1 random name from rank 1
    0 from rank 2 - No generation required
    1 casualty from rank 3 - generate 1 random name from rank 3
    8 casualties from rank 4 - generate 8 random names from rank 4

    The idea seems simple, but the coding is a little beyond me.

    Thanks for your time
    Last edited by Smythers00; 05-14-2014 at 11:16 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Complex random name generation from lists

    It needs some tidying up, but is this anything like you want?
    Pirate.xlsx

  3. #3
    Registered User
    Join Date
    05-25-2013
    Location
    Toronto, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Complex random name generation from lists

    That works quite nicely. Thank you very much for the help

+ 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. Help needed with complex random number generation
    By TechDaddyK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2011, 05:46 PM
  2. [SOLVED] Random Name Generation
    By Fleone in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2006, 04:25 PM
  3. Random Name Generation
    By pkbro in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] Random Generation
    By lordofthe9 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2005, 11:06 AM
  5. Random number generation
    By Stratuser in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2005, 09:06 AM

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