I am trying to create a macro that will index through an array of "keywords" than I have created and search the text contained in 2 different columns for any of these keywords. I have several rows of within each column that contain text strings.
I realize I have left out the rest of the code, but my main problem right now is setting the searchString variable equal to a certain cell. When I step into the code I receive an error pointing to the variable that says: Run-time error '1004": Application-defined or object-defined error.
Any thoughts?
For index = 1 To 25
For rowNum = 1 To 10000
searchString = Cells(rowNum, I)
If InStr(1, searchString, keyword(index), vbTextCompare > 1) Then
Cells(rowNum, Q) = "X"
Else
Cells(rowNum, Q) = "-"
Thanks!
I realize I have left out the rest of the code, but my main problem right now is setting the searchString variable equal to a certain cell. When I step into the code I receive an error pointing to the variable that says: Run-time error '1004": Application-defined or object-defined error.
Any thoughts?
For index = 1 To 25
For rowNum = 1 To 10000
searchString = Cells(rowNum, I)
If InStr(1, searchString, keyword(index), vbTextCompare > 1) Then
Cells(rowNum, Q) = "X"
Else
Cells(rowNum, Q) = "-"
Thanks!