VikingNik said:
couldn't you nest a left(right())? left(right(A1,15),5) or whatever? Everything is a known length from the end of the string or am I reading the problem statement wrong?
OP said:
Quote:
I have one more related question - this time for returning characters in the middle where the preceding length of characters varies and the text I'm extracting varies in length. However, there is an identifier (&Nyy=) that precedes what I'm trying to extract.
A1 = <some varying length of chars><&Nyy><target of varying length to extract><some varying length of chars>
So, varying length of characters before the string, varying length of characters in the string, and varying length of characters after the string. You know the string begins after <&Nyy>, but how do you know when the target string ends?
If I read the OP right, here are three sample strings that point out the problem as presented: if all I want are the capital A's, how do I write logic to pull them out (short of knowing what my target string is)?
ab&NyyAAAAabcd
abc&NyyAAabcde
a&NyyAAAabc
Here are some examples of what you would need to find the A's:
- Something unique about the target string itself (ie data in the string always ends in a character not found anywhere else, or data in the target string is all alpha while everything else is numeric)
- Specific length of the target string
- Specific length of data after the target string