In String Help (1 Viewer)

abbaddon223

Registered User.
Local time
Today, 12:19
Joined
Mar 13, 2010
Messages
162
Hi,

I'm struggling with what is no doubt something simple - any help really appreciated!!

I have a field: [comment] in which the follow value is as text:

3 from orders_10_11_13_2.csv for order 95D5KJQ8 Adref:Q3035

What I'd like back is just "95D5KJQ8" - so something to split this between "order" and "Adref:"

thanks!!

Phil.
 

David R

I know a few things...
Local time
Today, 14:19
Joined
Oct 23, 2001
Messages
2,633
Will the comment field ALWAYS contain "order" and "adref" like that? If so, why on earth is it a single comment field in the first place... but anyway.

Play with the InStr() function. It'll help you find the end of "order" and (if necessary) the start of "adref", so you can plug them into Mid(). If your order numbers are always going to be exactly the same length you can skip the second step and just set the last parameter of Mid() to 8.
 

Users who are viewing this thread

Top Bottom