Hello,
I have created and populated a 2-dimension array.
I think of arrays as rows and columns. aDistance(1,1) is a Name, aDistance(1,2) is a distance
I don't know how to reference all of the values in the second column of the array.
Dim aDistance() As Varient
ReDim aDistance(Last_Row, 2) 'Last_Row is variable of a range of rows in a worksheet, code not included here for clarity
The array is fully populated dynamically by other vba code. The resulting sample data set has 34 rows.
I want to obtain the minimum distance from all of the values in the Distance column of the array.
I am hoping the below will work, IF I knew how to reference the range of values in the second column.
mClosestPt = Min(aDistance(something here?))
Thank you for your time.
-DL
I have created and populated a 2-dimension array.
I think of arrays as rows and columns. aDistance(1,1) is a Name, aDistance(1,2) is a distance
I don't know how to reference all of the values in the second column of the array.
Dim aDistance() As Varient
ReDim aDistance(Last_Row, 2) 'Last_Row is variable of a range of rows in a worksheet, code not included here for clarity
The array is fully populated dynamically by other vba code. The resulting sample data set has 34 rows.
I want to obtain the minimum distance from all of the values in the Distance column of the array.
I am hoping the below will work, IF I knew how to reference the range of values in the second column.
mClosestPt = Min(aDistance(something here?))
Thank you for your time.
-DL