Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I googled Sorting Arrays in Excel and got the following:
'Sort array For lLoop = 0 To UBound(MyArray) For lLoop2 = lLoop To UBound(MyArray) If MyArray(lLoop2) < MyArray(lLoop) Then ' Swap values sgl1 = MyArray(lLoop) sgl2 = MyArray(lLoop2) MyArray(lLoop) = sgl2 MyArray(lLoop2) = sgl1 End If Next lLoop2 Next lLoop Testing each element against the other is what I couldn't seem to grasp. Thank you all for your input! -- Trent Argante [DC.J(549)] "Trent Argante" wrote: I have a single dimension array that I would like sorted, and I am just drawing a blank. Thanks, folks. -- Trent Argante [DC.J(549)] |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort 2D array | Excel Programming | |||
Array sort | Excel Programming | |||
Array... Sort of... | Excel Worksheet Functions | |||
Sort an Array | Excel Programming | |||
sort an array | Excel Programming |