Random Name Generator

gnaneswarv

New Member
Joined
May 24, 2018
Messages
2
I collected a list of around a 1000 names an was able to generate random Male and Female names. However, I would like to specify what letters the names should start with. For example, I have someone whose initials are S.B. I need to generate a random American name with those initials.

I'm using {=INDEX($A:$A,RANDBETWEEN(1,COUNTA($A:$A)),1)} to generate random names. Can anyone help with including a condition to look for the first letter in the list?

File can be accessed here: https://1drv.ms/x/s!AqS3jpc4XTWdmEA_HNrhYpyj9cP7

Thanks!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
In F4 use: =IFERROR(INDEX(A:A,MATCH(G2&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&"*",A:A,0)),(INDEX(A:A,MATCH(G2&"*",A:A,0)+RANDBETWEEN(1,10))))
In F5 use: =IFERROR(INDEX(B:B,MATCH(G2&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&"*",B:B,0)),(INDEX(B:B,MATCH(G2&"*",B:B,0)+RANDBETWEEN(1,10))))
In G4 & G5 use: =IFERROR(INDEX(C:C,MATCH(G3&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&"*",C:C,0)),(INDEX(C:C,MATCH(G3&"*",C:C,0)+RANDBETWEEN(1,10))))

These are looking for the selected first and last initials AND a randomly generating a-z letters after. Such as Ael* then matching. If that fails, it just matches on the selected letter and 1-10 random rows after. (change that part to something higher 1-20 to get more randomization
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top