Sorting and inserting problem
Hi All!
I have a set of data which i need to sort in a kind of complicated
way. The source data is in 2 columns and goes as follows:
1 2
1 2
1 3
1 3
1 4
1 5
1 5
2 1
2 1
3 1
4 1
4 1
4 1
etc..
what i need to get is:
1 2
1 2
2 1
2 1
1 3
1 3
3 1
1 4
4 1
4 1
4 1
1 5
etc..
In other words after each group of similiar data (i.e. 1 2) i should
put a group of inverse data (i.e. 2 1) . Have no idea where to start.
Any help would be greatly appreciated.
|