I posted this thread in the Excel area, then I realized that I can do this much easier in Access.
I need help creating a VB function.
I have a column with text (not exceeding 255 chars). Within the text, there is a specific 8 character string I'm interested in pulling (2 letters, 5 numbers, 1 letter) <= this is always the pattern (i.e. AB12345C).
The function needs to search through the text and when it finds the first instance return the string. If the function does not find any string, then it should return nothing.
Any help is greatly appreciated
This is a sample of the data I have in the column of my table
Notes
12342 John Doe AB12345C EN ME
897342 Jane Doe DE54321F EN ME
8923 Peter Doe GH23456I EN ME
40293074 Jamie Doe JK34567L EN ME
2093 Frank Doe MN45678O EN ME 298730 Alex Doe PQ98765R EN ME
This is the VB function I want to modify to include the specific pattern [A-Z]{2}[0-9]{5}[A-Z]{1}
I know I have to change the following argument to accomodate my string, but I don't know how:
IsNumeric(varString(intCounter))
![]()
Please Login or Register to view this content.
Bookmarks