Hello,
I am trying to find the first occurrence (row number) of an alphanumeric string starting with CA with 8 digits following it. Example, CA12345678. The string is randomly placed in the rest of the text in the cell. It could be the first or last word in the sentence but usually never the same.
The cells look something like this:
12/24/2020 Mrs. Smith Fixer Upper CA12345678 House and Windows
CA12345678 12/24/2020 Mrs. Smith Fixer Upper House
12/24/2020 Mrs. Smith Fixer CA12345678 CAB 12x26
The numbers in the string are always random and never the same
I tried using the Like function but I don’t think you can use it with the Find command. I tried using a wild character something like this:
Thinking that I could find the pattern of two letters followed by 8 digits as that seems to be unique in the report.
Any help is greatly appreciated.
I am trying to find the first occurrence (row number) of an alphanumeric string starting with CA with 8 digits following it. Example, CA12345678. The string is randomly placed in the rest of the text in the cell. It could be the first or last word in the sentence but usually never the same.
The cells look something like this:
12/24/2020 Mrs. Smith Fixer Upper CA12345678 House and Windows
CA12345678 12/24/2020 Mrs. Smith Fixer Upper House
12/24/2020 Mrs. Smith Fixer CA12345678 CAB 12x26
The numbers in the string are always random and never the same
I tried using the Like function but I don’t think you can use it with the Find command. I tried using a wild character something like this:
VBA Code:
Range("A1:A100").Find(What:="CA????????", After:=Range("A1")).Row
Thinking that I could find the pattern of two letters followed by 8 digits as that seems to be unique in the report.
Any help is greatly appreciated.