Isolate Value in String

  • Thread starter Thread starter Suthee
  • Start date Start date
S

Suthee

Hello--

I have field in a table that contains a client's name and ID number. I need
to extract the ID number. The ID number is ALWAYS at the end of the string
and is ALWAYS enclosed in parentheses. For example "John P. Doe (200250)".
In this case I want the "200250". The client ID number ranges from two to
six digits, and since that number changes I don't know how to figure this
out with a simple Right expression... Any ideas?

Thanks!
 
Hello--

I have field in a table that contains a client's name and ID number. I need
to extract the ID number. The ID number is ALWAYS at the end of the string
and is ALWAYS enclosed in parentheses. For example "John P. Doe (200250)".
In this case I want the "200250". The client ID number ranges from two to
six digits, and since that number changes I don't know how to figure this
out with a simple Right expression... Any ideas?

Thanks!

Here is one way.
1) =Val(Mid([FullString],InStr([FullString],"(")+1))
 
This worked perfectly! Thank you very much!

fredg said:
Hello--

I have field in a table that contains a client's name and ID number. I
need
to extract the ID number. The ID number is ALWAYS at the end of the
string
and is ALWAYS enclosed in parentheses. For example "John P. Doe
(200250)".
In this case I want the "200250". The client ID number ranges from two
to
six digits, and since that number changes I don't know how to figure this
out with a simple Right expression... Any ideas?

Thanks!

Here is one way.
1) =Val(Mid([FullString],InStr([FullString],"(")+1))
 
Back
Top