T
TheObstacleIsThePath
I'd like a VB script method of sorting that uses two columns (both
contain dates/times). I want to sort the entire row in ascending
order by the lesser value of the two columns.
Example:
column A Column B
Row 1: 1
2 <--lesser value is 1
Row 2: 2
2 <--Lesser value is 2
Row 3: 4
4 <--Lesser value is 4
Row 4: 5
3 <--Lesser value is 3
BECOMES:
column A Column B
Row 1: 1 2
Row 2: 2 2
Row 3: 5 3
Row 4: 4 4
I could do it using a third column, but would prefer something more
elegant using a temproray array. Any help would be appreciated. My
problem is this: I can create a "sort-order array", but I don't know
how to shuffle the rows according to the sequence of the array.
Thanks in advance,
Todd
contain dates/times). I want to sort the entire row in ascending
order by the lesser value of the two columns.
Example:
column A Column B
Row 1: 1
2 <--lesser value is 1
Row 2: 2
2 <--Lesser value is 2
Row 3: 4
4 <--Lesser value is 4
Row 4: 5
3 <--Lesser value is 3
BECOMES:
column A Column B
Row 1: 1 2
Row 2: 2 2
Row 3: 5 3
Row 4: 4 4
I could do it using a third column, but would prefer something more
elegant using a temproray array. Any help would be appreciated. My
problem is this: I can create a "sort-order array", but I don't know
how to shuffle the rows according to the sequence of the array.
Thanks in advance,
Todd