re swap space storage:
    'ReDim vSortItems(1 To iColumns) As tGridCell
    ' Get inital shell sort increment
    If (iItemCount &gt; 2) Then
        iIncrement = piGetSuitableShellSortInitialIncrement(iItemCount)
        Do Until iIncrement &lt; 1
            For iMainLoop = iIncrement + 1 To iItemCount
            
                LSet tSortRow = tRows(iMainLoop)
                iMainLoopRow = tRows(iMainLoop).lGridCellArrayRow
                
                ' Loop from MainLoop-Increment to start item