random names generator

  • Thread starter Thread starter badtaste
  • Start date Start date
B

badtaste

I`m curently working on a random name generator, which is suppoused t
look like this:
two collumns:
First Name/Last Name
John/Mckeggan
Jack/Marcus
Jill/Hayle
.../...

The idea is to make a generator which will randomly pick one first an
one last name and make it into a full name. Any suggestions?Ideas?!

PLEASE HELP!!!:confused
 
You need a long list of possible first names and another long list of possible last names
for a start. Do you want a manually operated generator, a formula trick or a VBA program
for this ?

--
HTH. Best wishes Harald
Followup to newsgroup only please.

badtaste said:
I`m curently working on a random name generator, which is suppoused to
look like this:
two collumns:
First Name/Last Name
John/Mckeggan
Jack/Marcus
Jill/Hayle
../...

The idea is to make a generator which will randomly pick one first and
one last name and make it into a full name. Any suggestions?Ideas?!

PLEASE HELP!!!:confused:


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to creating financial
statements
 
If you are looking for a formulae to generate a full
name, try using a vlookup() and randombetween() or random
() functions. First add a number series to the left of
each name fields. Now create a vlookup() where the
lookup value is the random number generator. You will
need two vlookup functions, one for each field. You will
also need to force the random() function to return an
integer number by using something like a round() function.

Hope this helps,
Ron_D

-----Original Message-----

I`m curently working on a random name generator, which is suppoused to
look like this:
two collumns:
First Name/Last Name
John/Mckeggan
Jack/Marcus
Jill/Hayle
.../...

The idea is to make a generator which will randomly pick one first and
one last name and make it into a full name. Any suggestions?Ideas?!

PLEASE HELP!!!:confused:


------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by
step guide to creating financial statements
 
There are several ways of approaching this - all have to use the Exce
random generator to produce a random number which can then be used t
extract a name from a list. This one uses the row number of a workshee
:-

'-----------------------------------------
'- eg. list of 10 first names column 1
'- 10 last names column 2
'----------------------------------------
Sub RandomName()
Dim First As Integer
Dim Last As Integer
Dim FirstName As String
Dim LastName As String
'-----------------------
Randomize
First = Int((10 * Rnd) + 1)
Last = Int((10 * Rnd) + 1)
FirstName = ActiveSheet.Cells(First, 1).Value
LastName = ActiveSheet.Cells(Last, 2).Value
MsgBox (FirstName & " " & LastName)
End Sub
'---------------------------------------

Using the same list, to get the first name in a worksheet you can us
:-
=INDEX(A1:A10,INT((RAND()*10)+1))

or, if the Analysis Toolpak is installed :-
=INDEX(A1:A10,RANDBETWEEN(1,10)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top