Hi All,
I'm sure this has probably been done to death but for the life of me I cannot find a solution that fits my need.
I wish to return the characters after the 2nd "_" in a text string. However, this text string may or may not contain further "_" after the text that I want. For instance, for the values shown in the first column, I require the output shown in the 2nd collumn;
S1_358_801 801 S1_358_801_PR2 801 S1_370_733A 733A S1_3701_722_BA1 722 S31_342_902 902
As can be seen the number of characters between "_" can change and I'm only after the characters after the 2nd "_" but before the 3rd "_" if it exists.
I have tried using a MID function but to no avail as of yet as occasionally the lenth changes, thus for the length I imagine I would have to use a combination of RIGHT, FIND, LEN and maybe TRIM functions but I dont know how to do this.
Any Assistance is appreciated.
Cheers,
Ben
Bookmarks