Reputation: 23
I want to randomise a column of data in excel and then populate a new column with this randomised data. i.e. I want to randomise the contents of column B and then paste the results into column C but multiple times (100+).
I have yet to learn VBA but I imagine there is some code that would achieve this?
Upvotes: 0
Views: 153
Reputation: 96753
No VBA is required for this. Say we have data from B1 through B22. In A1 enter:
=RAND()
and copy downwards. In C1 enter:
=INDEX(B:B,MATCH(LARGE($A$1:$A$22,ROWS($1:1)),$A$1:$A$22,0))
and copy downwards. Each time the worksheet is re-calculated, a new "shuffle" will appear in column C:
Upvotes: 1