ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Random Name Generation (https://www.excelbanter.com/excel-worksheet-functions/31615-random-name-generation.html)

pkbro

Random Name Generation
 

Okay, here's a tricky question. I'm trying to get Excel to Concatenate
Random Cells. Is there any way to do this?

What I would like it to do is basically this: A1 is "B", A2 is "C", A3
is "R", B1 is "at", B2 is "an", and B3 is "ob". I'm trying to create is
a command that would do the following:

=CONCATENATE(A(INT(RAND()*(3-1)+1)),B(INT(RAND()*(3-1)+1)))

I tried this conbination command and Excel wigged out. What I was
looking for is a field that could return *ANY* of the following, chosen
at random: Bat, Cat, Rat, Ban, Can, Ran, Bob, Cob, Rob.

Any suggestions on how to pull this off?


--
pkbro
------------------------------------------------------------------------
pkbro's Profile: http://www.excelforum.com/member.php...o&userid=24472
View this thread: http://www.excelforum.com/showthread...hreadid=380712


RagDyer

Why not just enter all these possibilities in a column, and then refer to
the range with a formula such as this:

=INDEX(A1:A9,INT(RAND()*9)+1)

Then, at each hit of <F9 (calculate key), you'll get a new selection.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"pkbro" wrote in message
...

Okay, here's a tricky question. I'm trying to get Excel to Concatenate
Random Cells. Is there any way to do this?

What I would like it to do is basically this: A1 is "B", A2 is "C", A3
is "R", B1 is "at", B2 is "an", and B3 is "ob". I'm trying to create is
a command that would do the following:

=CONCATENATE(A(INT(RAND()*(3-1)+1)),B(INT(RAND()*(3-1)+1)))

I tried this conbination command and Excel wigged out. What I was
looking for is a field that could return *ANY* of the following, chosen
at random: Bat, Cat, Rat, Ban, Can, Ran, Bob, Cob, Rob.

Any suggestions on how to pull this off?


--
pkbro
------------------------------------------------------------------------
pkbro's Profile:

http://www.excelforum.com/member.php...o&userid=24472
View this thread: http://www.excelforum.com/showthread...hreadid=380712




All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com