Hi
I have a list of data that will include numbers 1,2,3,4. First, I have some code that sorts into ascending order, but then I'd like some more code that then distributes the list as follows. Original in Column A and the desired order in Column C. In this example, there are 6x 1, 8x 2, 5x 3, 6x 4:
Note cell C23 is 4 because the 3's have run out. Also note cells C24 and C25 because there are 2 more 2's left over.
<tbody>
</tbody>
I have a list of data that will include numbers 1,2,3,4. First, I have some code that sorts into ascending order, but then I'd like some more code that then distributes the list as follows. Original in Column A and the desired order in Column C. In this example, there are 6x 1, 8x 2, 5x 3, 6x 4:
Note cell C23 is 4 because the 3's have run out. Also note cells C24 and C25 because there are 2 more 2's left over.
A | B | C | |
1 | 1 | 1 | |
2 | 1 | 2 | |
3 | 1 | 3 | |
4 | 1 | 4 | |
5 | 1 | 1 | |
6 | 1 | 2 | |
7 | 2 | 3 | |
8 | 2 | 4 | |
9 | 2 | 1 | |
10 | 2 | 2 | |
11 | 2 | 3 | |
12 | 2 | 4 | |
13 | 2 | 1 | |
14 | 2 | 2 | |
15 | 3 | 3 | |
16 | 3 | 4 | |
17 | 3 | 1 | |
18 | 3 | 2 | |
19 | 3 | 3 | |
20 | 4 | 4 | |
21 | 4 | 1 | |
22 | 4 | 2 | |
23 | 4 | 4 | |
24 | 4 | 2 | |
25 | 4 | 2 |
<tbody>
</tbody>