Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Jan 2011
    Location
    Illinois
    Posts
    62
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Random name generator?

    Hi, all. Using Office 2013.

    I'm wondering if there is a function in Excel that will generate random names instead of random numbers? As I teacher, I'm often creating exercise files and get really tired of cartoon character names, fictional-character names, etc. (both inventing and typing). Not hopeful, but wondering??

  2. #2
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    1,723
    Thanks
    146
    Thanked 156 Times in 149 Posts
    Have you tried Googling 'random name generator'? You could use one of the results to generate a text file of names and use a random number in Excel to pick one out. Unless someone knows there's such a generator in Excel of course.

  3. #3
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi

    I agree - it's a pain creating sample data.
    I have sample data files for 500, 5,000 and 500,000 records with names, addresses, zip codes, email addresses, company names etc. etc.
    I will try and find where I got them from and post a link.

    zeddy

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    I would think that a random number could be generated between certain values then use a VLookup to return the name next to it. Would not be difficult to construct if you have a large available list of names.

    Maud

  5. #5
    Star Lounger
    Join Date
    Jan 2011
    Location
    Illinois
    Posts
    62
    Thanks
    17
    Thanked 2 Times in 2 Posts
    That's the thing - I don't have the list of names.

    Googling just gave me ideas for choosing random names from a list. I actually wanted to CREATE the names. I ended up doing a google search for .xls files and found a couple of different lists that contained names. Copied and pasted into a single Excel file. Viola! 500+ names.

    Thanks for the ideas.

  6. #6
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Here is a way to generate your own random names.

    Name Generator.png

    Code:
    Public Sub MaleName()
    Randomize
    num = Int((200 * Rnd) + 1)
    x = WorksheetFunction.VLookup(num, Range("A2:B201"), 2)
    MsgBox x
    End Sub
    
    Public Sub FemaleName()
    Randomize
    num = Int((200 * Rnd) + 1) + 200
    x = WorksheetFunction.VLookup(num, Range("C2:D201"), 2)
    MsgBox x
    End Sub
    Attached Files Attached Files

  7. #7
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts

    Sample Data for Excel testing

    Hi

    ..here are three zip files containing 500, 5000, and 50000 sample records.
    When extracted, the sample files are 550.csv, 5000csv and 50000.csv
    These csv files can be opened directly in Excel.

    When I need sample data, I can copy and paste from these files.
    For sample numeric data, I often use the =RANDBETWEEN function etc etc.

    zeddy
    Attached Files Attached Files

  8. The Following User Says Thank You to zeddy For This Useful Post:

    ILGal (2016-10-07)

  9. #8
    New Lounger
    Join Date
    Mar 2015
    Location
    Derby
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you need full names or just first names. You can extend the ideas above with the vlookup function to randomly select a first name and a surname from a column of first names and a column of surnames.

    I used to work in software testing and we had a vlookup function generatign full names and adddress from columns of data and random numbers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •