Uncle Potato Guest
|
Posted: Mon Aug 08, 2005 2:59 am Post subject: Excel Sorting |
|
|
I got this example from the net, but I am not sure what columns it is
sorting.
Can someone give some hint?
Excel.Range['A7', 'Q5800'].Sort(
Excel.Cells.Item[2, 2], xlAscending,
Excel.Cells.Item[2, 3], EmptyParam, xlDescending,
EmptyParam, xlAscending, xlYes, EmptyParam,
True, xlTopToBottom, xlSyllabary, EmptyParam,
EmptyParam, EmptyParam);
I am trying to sort rows 7 .. 5800 with column G
So I try to replace the Cells.ITem[2,2] with [8,1] and it doesn't seem
to perform what I wanted.
What is the Excel.Cells.Item[arow,acolumn] suppose to point to ?
I only expect giving a column num instead of a cell ?
Or is 2,2 is a series of columns? (guess not)
How about the 2,3 that follows ? I guess the line that contains 2,3
is a second column to sort, but i tried removing the whole line (if I
only need to sort by a single column) But excel doesn't like it.
Thanks
|
|