View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] etradeguru@hotmail.com is offline
external usenet poster
 
Posts: 19
Default extracting data to the right of a set character

On 21 Aug, 19:41, Ron Rosenfeld wrote:
On Tue, 21 Aug 2007 18:17:03 -0000, wrote:
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.


Will "xxx" always be all of the characters following the last full stop?

If so, then:

=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,".",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1,".",""))))+1,255)

--ron



Ron, that is just the ticket. I have run it against two sets of data
from different days and the result is spot on.
Thank you.

Thanks to everyone else as well, all responses very much appreciated.

Mark