10.8 Shuffle the data

 

Here below is a data table:

imagepng

Shuffle the data of each row:

=spl("=clipboard(E(?1.(~.sort(rand()))))",A1:D5)

imagepng

Shuffle the data of each column:

=spl("=clipboard(E(transpose(transpose(?1).(~.sort(rand())))))",A1:D5)

imagepng

Shuffle the data of the whole area:

=spl("=clipboard(E(?1.conj().sort(rand()).group(#%5)))",A1:D5)

imagepng

Notes:
Only when Ctrl-Enter is pressed will the set returned by SPL() be filled in multiple cells, while other methods that trigger the calculation will only fill in the first member. In this example, the data are shuffled in a random way, and each calculation result is different, therefore, in this code, the result is copied to the clipboard, which can be pasted into the target cell after calculation.


esProc Desktop and Excel Processing
10.7 Sort by specified order in which duplicate values exist
10.9 Ranking of simple members