Scenario:
- I copy a large group of text to the clipboard
- I set said text to a string variable, let's call it RawText
- I proceed to perform a split function on RawText, using 'vbCrLf' as the separating factor. This gets placed into an array, let's call it Array1
There will always be a maximum of 20 separate strings in this array, but often less.
I would like to use some sort of function that would allow me to extract the entire string of an array if it matches the first part of a string.
Example:
Lets say I copy the following text to the clipboard (and then store it under the string RawText).
ABCD: Apple
ABBC: Banana
ACEF: Orange
Now, I proceed to use split function as such:
Array1 = Split(RawText,vbCrLf,20)
The Array1 Values should be: {"ABCD: Apple", "ABBC: Banana", "ACEF: Orange"}
I would like to use something such as the Like statement and pull out the entire value of the string in the array if it matches, such as:
which would set MyString = "ABCD: Apple"
I hope this makes sense, I just need the proper context in how I can go through all the strings in the Array1 and find the one that matches my Like Statement.
Bookmarks