How to search a column of text in Excel? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to search a column of text in Excel?

maciv4maciv4 Posts: 1Member
I am a newbie to Excel VBA and I am trying to search this column of text using an input string. I don't know the best way to declare an existing column of strings so that I can search each cell one at a time and place the matches into either an array or another location within the spreadsheet. I don't have Access, just Excel. Any suggestions? I am using InStr, taking the Boolean output to ID the cell and copy the cell info. Here is the search code using an array.

i = i + 1
Count = 1
For Each Cel In Description
If InStr(Part, Description(i)) Then
ReDim Preserve PartsList(Count)
PartsList(Count) = Description(i)
Count = Count + 1
Else
i = i +1
End If
Next
Sign In or Register to comment.