Hi, I would appreciate any help on how to write some code to sort groups of cells I have into numerical order. The cells are grouped like this:
<tbody>
</tbody>
The numbers are start and end times so I would like to sort the cells by the first number in each group (cells A1, A5, A9, A13 in my example) so the result should be this:
<tbody>
</tbody>
I'm new to coding so really not sure the best way of doing it. The groups of cells are all named ranges if that makes it simpler? Many thanks!
A | B | |
1 | 15 | 16 |
2 | green | |
3 | triangle | |
4 | ||
5 | 11 | 12 |
6 | blue | |
7 | square | |
8 | ||
9 | 20 | 21 |
10 | yellow | |
11 | diamond | |
12 | ||
13 | 7 | 8 |
14 | red | |
15 | circle |
<tbody>
</tbody>
The numbers are start and end times so I would like to sort the cells by the first number in each group (cells A1, A5, A9, A13 in my example) so the result should be this:
A | B | |
1 | 7 | 8 |
2 | red | |
3 | circle | |
4 | ||
5 | 11 | 12 |
6 | blue | |
7 | square | |
8 | ||
9 | 15 | 16 |
10 | green | |
11 | triangle | |
12 | ||
13 | 20 | 21 |
14 | yellow | |
15 | diamond |
<tbody>
</tbody>
I'm new to coding so really not sure the best way of doing it. The groups of cells are all named ranges if that makes it simpler? Many thanks!