Sorting

  • Thread starter Arun Kumar Saha
  • Start date
A

Arun Kumar Saha

Dear all,

I created a procedure where I defined a matrix "V" with row 100 and
column 6
Now I want to sort it's row according to the value of it's last column.
To get this, I wanted to know how Excel does this, through recording a
macro. I got following procedure:

Range("A1:C16").Select
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


Now I used same syntax for my problem :

Range(V).Select
Selection.Sort Key1:=Range(V(1, 6)), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

However I am getting error while executing.

Can anyone give me any idea on how exactly I should do this?

Thanks and regards,
Arun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top