# How to shuffle a list of names within a column



## studentlearner (Oct 20, 2021)

Most of the online resources regarding RAND shuffles all my data which mess my excel up, so In this case i would like to shuffle only a column for example from H2:H40.

The value inside the cell will be string. Any help with the formula would be great!! Thank You!


----------



## Jon von der Heyden (Oct 20, 2021)

Hi

So lets say that your data is in H2:H240.  Lets also assume that column J is free (Adjust this accordingly).

In J2 enter: =SORTBY(SEQUENCE(ROWS(H2:H240)),RANDARRAY(ROWS(H2:H240)))

Then to get the names in the random order, in K2 enter: =INDEX(H2:H240,J2#,1)

Hope this helps.


----------



## studentlearner (Oct 20, 2021)

The solution was perfect!! Thank you!!


----------



## Peter_SSs (Oct 20, 2021)

I don't think that you actually need a helper column as I think this does what you want directly?

studentlearner_1.xlsmHI12Text 1Text 353Text 2Text 344Text 3Text 95Text 4Text 116Text 5Text 147Text 6Text 18Text 7Text 289Text 8Text 410Text 9Text 3111Text 10Text 1712Text 11Text 2213Text 12Text 2514Text 13Text 715Text 14Text 1916Text 15Text 1317Text 16Text 3718Text 17Text 2019Text 18Text 1820Text 19Text 2121Text 20Text 2422Text 21Text 1223Text 22Text 1524Text 23Text 225Text 24Text 2326Text 25Text 827Text 26Text 3328Text 27Text 2929Text 28Text 3630Text 29Text 3031Text 30Text 3832Text 31Text 2633Text 32Text 2734Text 33Text 3935Text 34Text 636Text 35Text 337Text 36Text 1638Text 37Text 1039Text 38Text 540Text 39Text 32Sheet1Cell FormulasRangeFormulaI2:I40I2=SORTBY(H2:H40,RANDARRAY(ROWS(H2:H40)))Dynamic array formulas.


----------



## Jon von der Heyden (Oct 20, 2021)

Peter_SSs said:


> I don't think that you actually need a helper column as I think this does what you want directly?


You're right Peter.  I over-engineered that.  I'm getting a bit carried away with all of these wonderful new functions that I didn't know about.  I feel like an excited noob again!


----------



## Peter_SSs (Oct 20, 2021)

Jon von der Heyden said:


> I'm getting a bit carried away with all of these wonderful new functions that I didn't know about. I feel like an excited noob again!


----------



## Akram Siblee (Monday at 5:53 PM)

We can use SORTBY Function along with RANDARRY and COUNTA functions to shuffle the name column.
Formula is: =SORTBY(A2:A11,RANDARRAY(COUNTA(A2:A11)))


----------

