Forum Discussion
Generate sets of five numbers base on the given numbers from 5 different columns
col_12 = torow(col1 & transpose(col2))
col_123 = torow(col_12 & col_3)
col_1234 =torow(col_123 & col_4)
col_12345 = torow(col_1234 & col_5)
- mathetesApr 30, 2024Silver Contributor
To anybody and everybody tuning in on this thread, let me refer you back to the original, where rachel has resolved the matter to the satisfaction of Marco365
Do NOT take any time to work toward resolution here.
- djclementsApr 30, 2024Bronze Contributor
mathetes If you are interested, I had shared a couple versions of a generalized LAMBDA function a month ago, for generating permutations and combinations:
- https://stackoverflow.com/questions/78218953/finding-unique-combination-sets...
- https://techcommunity.microsoft.com/t5/excel/creating-table-from-2-tables...
The first version would work well in this case, with a slight modification to ignore blanks:
PERMA: =LAMBDA(array1,[array2],[ignore_blanks], IF( ISOMITTED(array2), REDUCE( TOCOL(CHOOSECOLS(array1, 1), ignore_blanks), SEQUENCE(COLUMNS(array1)-1,, 2), LAMBDA(v,n, PERMA(v, TOCOL(CHOOSECOLS(array1, n), ignore_blanks))) ), LET( a, SEQUENCE(ROWS(array1)), b, SEQUENCE(, ROWS(array2)), HSTACK( CHOOSEROWS(array1, TOCOL(IF(b, a))), CHOOSEROWS(array2, TOCOL(IF(a, b))) ) ) ) )
Once defined in Name Manager, the PERMA function can then be used to generate the desired output as follows:
=PERMA(A1:E7,, TRUE)
See attached...
- mathetesApr 30, 2024Silver Contributor
"If you are interested..."
It IS interesting, the capabilities of Excel are more extensive than any one of us can conceive, I suspect.
In this case, this particular capability, while theoretically interesting, is one that I have a difficult time imagining ever actually encountering a practical application. I'm filing it away in my outstanding solutions folder--thank you!--but mostly as a curiosity.