Displaying posts categorized under

Technology

Excel VBA Quick Reference 2: swyxSort2DArrayForTopX

This does what it says: Private Sub swyxSort2DArrayForTopX(inputarray(), outputarray(), sortcolnum As Integer, Optional TopX As Integer = 10, Optional AbsValue As Boolean = True)     Dim sortindex()     ReDim sortindex(1 To TopX)     Dim sortedcol()     ReDim sortedcol(1 To TopX)     ‘first one         sortedcol(1) = inputarray(LBound(inputarray), sortcolnum)         sortindex(1) = LBound(inputarray)     Dim j, [...]