Sssh - and there I was thinking someone had a constructive reply!!
I've gathered some more information on the array and what's happening/desired output, etc, so please bear with me.
Column orientation should be fixed, but content should be ordered vertically by a given row.
Two-dimensional array in the format (9,x) where:
Dimension 1 is the number of columns (fixed)
Dimension 2 is the number of rows (dynamic)
Example below is (9,3)
Unsorted output.
Col0 Col1 Col2 Col3 Col4 Col5 ... Col9
Prefix Code Description Filetype reserved/blank
ABC MA5212 3description (HTML File)
ABC MA5454 Another description (HTML File)
ABC MA7781 sdglkn sdjgsg sgsfb (HTML File)
ABC MA6144 weowe r, mdsf sdfjh (HTML File)
Sorted output.
Col4 ... Col 9 Col3 Col2 Col0 Col1
reserved/blank Filetype Description Prefix Code
(HTML File) 3description ABC MA5212
(HTML File) Another description ABC MA5454
(HTML File) sdglkn sdjgsg sgsfb ABC MA7781
(HTML File) weowe r, mdsf sdfjh ABC MA6144
Desired sorted output on Col1(code) - note Col1 is ordered, other cols follow suit, but don't break order.
Col0 Col1 Col2 Col3 Col4 Col5 ... Col9
Prefix Code Description Filetype reserved/blank
ABC MA5212 3description (HTML File)
ABC MA5454 Another description (HTML File)
ABC MA6144 weowe r, mdsf sdfjh (HTML File)
ABC MA7781 sdglkn sdjgsg sgsfb (HTML File)
I've got some code to swap the two dimensions of the array over and that works, but the output isn't what's desired.
Input:
Col0, Row0..Col9, Row0
Col0, Row1..Col9, Row1
..
Col0, Row3..Col9, Row3
Output:
Col0, Row0..Col0,Row3
Col1, Row0..Col1, Row3
..
Col9, Row0..Col9, Row3
A database has been suggested as a possible workaround, given it's sorting capabilities but we're trying to keep everything in one place without introducing DB's to the solution(problem).