Hello forum.
I have a question about generating an array based on a certain set of parameters.
In the example table at the bottom of this post, the first row of numbers (1, 2, and 3) represent desired values, and the second row (4, 3, and 2) represent the desired frequency of each of those respective values.
In other words, I would like to generate an array with four 1s, three 2s, and two 3s: {1,1,1,1,2,2,2,3,3}
Is there a formula that could dynamically generate such an array?? (An implementation without VBA would be ideal.)
So far I've figured out a formula to create three separate arrays ({1,1,1,1} and {2,2,2} and {3,3}; each separate formulas in adjacent cells) -- but there seems to be no easy way of joining/concatenating those arrays...
Your help is appreciated!
[TABLE="class: grid, width: 425, align: left"]
<tbody>[TR]
[TD="align: center"]Values:[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Frequency:[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]
I have a question about generating an array based on a certain set of parameters.
In the example table at the bottom of this post, the first row of numbers (1, 2, and 3) represent desired values, and the second row (4, 3, and 2) represent the desired frequency of each of those respective values.
In other words, I would like to generate an array with four 1s, three 2s, and two 3s: {1,1,1,1,2,2,2,3,3}
Is there a formula that could dynamically generate such an array?? (An implementation without VBA would be ideal.)
So far I've figured out a formula to create three separate arrays ({1,1,1,1} and {2,2,2} and {3,3}; each separate formulas in adjacent cells) -- but there seems to be no easy way of joining/concatenating those arrays...
Your help is appreciated!
[TABLE="class: grid, width: 425, align: left"]
<tbody>[TR]
[TD="align: center"]Values:[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Frequency:[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]