I have a list like:
| Name | number | order |
|------|--------|-------|
| rt | 7432 | down |
| ht | 2000 | up |
| hr | 2730 | up |
| cc | 1000 | down |
| af | 1430 | down |
| ge | 3000 | up |
| bb | 4800 | down |
| ke | 1200 | up |
| wd | 1100 | up |
what i need to do is to sort this list like:
| name | number | order |
|------|--------|-------|
| ge | 3000 | up |
| hr | 2730 | up |
| ht | 2000 | up |
| ke | 1200 | up |
| cc | 1000 | down |
| wd | 1100 | up |
| af | 1430 | down |
| bb | 4800 | down |
| rt | 7432 | down |
- Note
- the list is divided into two groups "up" and "down"
- the "number" column is ordered based on : high, middle, low/low, middle, high
- Regardless of the "up" and "down" grouping, the lowest number should be in the middle, when the number of rows are odd and one of the middle rows when the rows are even.
are there any efficient way of creating this new list without having to check every row and placing it into the new list !!??
your input is greatly appreciated