WebGuy
08-09-2006, 04:44 AM
Hello!
I need some help to find values in a range and put them in a matrix.
First a breif explaination of what i want to do:
I have a spreadsheet full of logs (8 columns). I want to search the textstrings in column 8. if i find a "Keyword" i want to copy that entire row into a matrix (Logmatrix(100,7)) so that each column value gets its own position in the matrix. I have attempted to try this, but since i have no previous experience in using find i am having trouble understanding how it works.
Here is a piexe of my code:
Set Foundcell = Range("H2:H65536").Find(What:=SearchString)
Do Until Foundcell Is Nothing
ActiveCell.Offset(0, -7).Select
i = 0
For i = 0 To 7
LogMatrix(j, i) = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
i = i + 1
Next i
j = j + 1
Set Foundcell = Range("H2:H65536").FindNext
Loop
I hope you can help me.
Thank you !
I need some help to find values in a range and put them in a matrix.
First a breif explaination of what i want to do:
I have a spreadsheet full of logs (8 columns). I want to search the textstrings in column 8. if i find a "Keyword" i want to copy that entire row into a matrix (Logmatrix(100,7)) so that each column value gets its own position in the matrix. I have attempted to try this, but since i have no previous experience in using find i am having trouble understanding how it works.
Here is a piexe of my code:
Set Foundcell = Range("H2:H65536").Find(What:=SearchString)
Do Until Foundcell Is Nothing
ActiveCell.Offset(0, -7).Select
i = 0
For i = 0 To 7
LogMatrix(j, i) = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
i = i + 1
Next i
j = j + 1
Set Foundcell = Range("H2:H65536").FindNext
Loop
I hope you can help me.
Thank you !