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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.