Randomly populating empty cells with other text cells

T

Throme88

I am attempting to figure out how to randomly populate a grouping of empty
cells by using another grouping of filled text cells. Keeping it random is
key. If anyone has any info, I would be very greatful. Thank you.
 
P

pallaver

For clarification purposes, something similar to the below?

AGD
CEZ
BMP

to

PEA
DZB
CGM

Keeping all the same text, just reordering them, correct?

If so, just thinking out loud without trying it out myself in excel,
but I would try to do the following:

a. Put all the text into a list using a double For/Next loop for
column/row.
b. At the same time you're making the list, count the number of
entries.
c. Repeat the same For/Next loop but have a randomly generated number
determine which word in the list to use.
d. Remove the word from the list once it's been placed and subtract 1
from the number of entries count.
 
B

Bernd P

Hello,

Search for the words index and uniqrandint in this group.

Regards,
Bernd
 
M

Max

One simple play to tinker with

Assume the source text cells are within A1:A5
In B1: =RAND()
In C1: =INDEX($A$1:$A$5,RANK(B1,$B$1:$B$5))
Copy B1:C1 down to C5

C1:C5 will return a random scramble of the source text in A1:A5
Press F9 to regenerate afresh

Just point to C1:C5 if you wish to re-lay the random scramble elsewhere
Example, you could place in any cell,
say in E2: =INDEX($C$1:$C$5,COLUMNS($A:A))
then copy E2 across to I2 to display the random scramble horizontally

Adapt/extend to suit
 

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

Top