(select all cells)
is an autofilter not sufficient?
I have a worksheet with a parameter with values appearing more than once.
Is there any way of using vlookup to get each of the rows.
For example in the attached file, say I want all the lat and long values for a particular SC, is there anyway of extracting all of them and storing in an array.
I tried vlookup, any other method would also be helpful
See the attached file.
But the problem is i need them as arrays in VBA so that i can use them with further calculations...
ie...I need an array for long(1......n)
That is an array with each of the long values
Break the formula into different parts. see what haapens.
This will give you the smallest position of the value to return in the array.
Aadarsh: I'm not a VB expert. So I hope someone in this forum will guide you.
Here is a small example to read data in an array.
GollemCode:Dim dbArray(1000) As Double Dim intRow As Integer Dim intIndex As Integer intRow = 3 'Data starts on row 3 intIndex = 0 Do While ActiveWorkbook.ActiveSheet.Cells(intRow, 1).Value <> "" 'SC = 1 example If ActiveWorkbook.ActiveSheet.Cells(intRow, 1).Value = 1 Then dbArray(intIndex) = ActiveWorkbook.ActiveSheet.Cells(intRow, 4).Value intIndex = intIndex + 1 End If intRow = intRow + 1 Loop
There are currently 1 users browsing this thread. (0 members and 1 guests)