AncientOne
New Member
- Joined
- May 22, 2014
- Messages
- 28
Everyone,<o
></o
>
<o
> </o
>
I am attempting to extract and concatenate the following type string, extracting only those items not in parenthesis and excluding the /.<o
></o
>
<o
> </o
>
Here is an example of the string:
abcd, efgh, ijkl (ok) / mno, pqr (need_help!)<o
></o
>
The string is not static in length, but is static in format regarding the manner in which / and parenthesis are used.<o
></o
>
<o
> </o
>
I am easily able to retrieve everything to the left of the (ok) but I am having difficulties retrieving the “mno, pqr” out of the string and concatenating it without the follow-on (need_help!).
Example of what I have thus far and block where I’m stuck:</SPAN>
I have attempted using multiple variations of Right and InStrRev along with the Len(var) - but I am just failing.</SPAN>
Can any of you mathematical Excel geniuses help me? I’m just stumped.</SPAN>
Sincerely,</SPAN>
AO </SPAN>
<o
I am attempting to extract and concatenate the following type string, extracting only those items not in parenthesis and excluding the /.<o
<o
Here is an example of the string:
abcd, efgh, ijkl (ok) / mno, pqr (need_help!)<o
The string is not static in length, but is static in format regarding the manner in which / and parenthesis are used.<o
<o
I am easily able to retrieve everything to the left of the (ok) but I am having difficulties retrieving the “mno, pqr” out of the string and concatenating it without the follow-on (need_help!).
Example of what I have thus far and block where I’m stuck:</SPAN>
Code:
.Cells(1, c).Value = Left(var, InStr(var, "(") - 1) '& vbCrLf & Right(var, InStrRev(var, " / ") - 1)</SPAN>
I have attempted using multiple variations of Right and InStrRev along with the Len(var) - but I am just failing.</SPAN>
Can any of you mathematical Excel geniuses help me? I’m just stumped.</SPAN>
Sincerely,</SPAN>
AO </SPAN>