how can I extract from the string below the character between the first dash and the second?
string= GP - 87415A - greene - r
result= 87415A
Is there a function available?
Thank you for your help.
tamtf
You can use the Instr function to find the position of the '-' character, then use Mid function to extract the section you want.
They are both well documented in VBHelp
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.