Tutorial by Examples

From VBA array sort function? Public Sub QuickSort(vArray As Variant, inLow As Long, inHi As Long) Dim pivot As Variant Dim tmpSwap As Variant Dim tmpLow As Long Dim tmpHi As Long tmpLow = inLow tmpHi = inHi pivot = vArray((inLow + inHi) \ 2) While (tmpLow <=...
This code takes advantage of the Sort class in the Microsoft Excel Object Library. For further reading, see: Copy a range to a virtual range How to copy selected range into given array? Sub testExcelSort() Dim arr As Variant InitArray arr ExcelSort arr End Sub Private Su...

Page 1 of 1