If you could help out, that's great.
I got a modification of my code (a bubble sort that sorts a one-dimensional array) which now sorts a two dimensional array. The problem is, it doesn't work. I barely understand bubble sorts as it is, and I can't figure out why the second one won't sort. Here's the code:
Code:
Public Function SortArrayOfZips(location() As Variant) As Variant()
Dim First As Integer, Last As Integer
Dim i As Integer, j As Integer
Dim Temp As String
First = LBound(location)
Last = UBound(location)
For i = First To Last
For j = First To (Last - i - 1)
If location(j, First) > location(j + 1, First) Then
Temp = location(j, 1)
location(j, 1) = location(j + 1, 1)
location(j + 1, 1) = Temp
End If
Next j
Next i
SortArrayOfZips = location()
End Function
Thanks much in advance!
Adrian