How to sortrows in VBA, instead of Matlab?
Question
I have a question about sorting an array in VBA. Previously I programmed in Matlab and I would like to do something like: P = sortrows(P,3), but using VBA. That organizes a matrix by the 3 column.
Is it possible to do something similar in VBA?
Does anyone can help me ?
Thank u!
Augusto Mello
Solution
Use Range.sort
Dim lastrow As Long
lastrow = Cells(Rows.Count, 2).End(xlUp).Row
Range("C" & lastrow).Sort
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow