RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 810
- Office Version
- 365
- Platform
- Windows
Hi guys, have a string that looks like this:
Standard_16x4_3UK
or
BAC_T_9x6_1UK
or
Filler_17.5x9_1UK
What I need to do is find x, then extract text around it, between the first underscores it finds. Output would thus be:
16x4, 9x6 and 17.5x9
So far I have code to find the position value of a certain character using InStr, but this doesn't help me get the characters to the left and right of the 'x' up until it finds the underscore.
Right now I'm torn between using a combination of Instr, Find, Mid & Len, or using a split function... And I don't know where to start on either.
Thanks.
Standard_16x4_3UK
or
BAC_T_9x6_1UK
or
Filler_17.5x9_1UK
What I need to do is find x, then extract text around it, between the first underscores it finds. Output would thus be:
16x4, 9x6 and 17.5x9
So far I have code to find the position value of a certain character using InStr, but this doesn't help me get the characters to the left and right of the 'x' up until it finds the underscore.
Right now I'm torn between using a combination of Instr, Find, Mid & Len, or using a split function... And I don't know where to start on either.
Thanks.