14.11 Generate permutations and combinations

 

Here below is a data table, in which the data are separated by commas:

imagepng

Now we want to list the permutations and combinations of these data, one combination per row, as shown in the following figure:

imagepng

Enter in cell A2:

A
1 =‘A1:C1’.conj().(~.split@c())
2 =A1.(“A1(”/#/“)”).concat(“;”)
3 =xjoin(${A2})

A1: Split the data in each cell with comma, and the option @c means splitting with comma
A2: Loop through each member of A1 and concatenate them into a string A1(1);A1(2);A1(3)
A3: Convert the string concatenated in A2 to the parameter of the function xjoin in macro form, that is, perform full cross-product on the sequences formed by split data in each cell


https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1658885977557
https://c.scudata.com/article/1658971295726