extracting data to the right of a set character
One way:
This assumes that there will be a value from 2 to 5 characters after the
last period. If there isn't, then the result will be false.
=IF(MID(A1,LEN(A1)-2,1)=".",RIGHT(A1,2),IF(MID(A1,LEN(A1)-3,1)=".",RIGHT(A1,3),IF(MID(A1,LEN(A1)-4,1)=".",RIGHT(A1,4),IF(MID(A1,LEN(A1)-5,1)=".",RIGHT(A1,5)))))
HTH,
Paul
--
wrote in message
oups.com...
I would like to know if there is a way to isolate the characters to
the right of a set of characters in a string.
I know the basics on how to use the LEN, MID, RIGHT and LEFT functions
but the problem I have is that the character is a full stop and for
some of the data, the full stop occurs more than just once, otherwise
it would be quite simple.
For instance a string could be as follows: -
yyy.yyyy.yyyyyyy.yy.y.yyy.xxx
where I need to capture the xxx and the xxx could be between 2 and 5
characters long.
I have tried all sorts of ways with modified code from postings on the
Group but to no avail.
Help much appreciated.
Mark.
|