Find Fn from right?

M

mikelee101

Hello,
Is there a way to use the Find function, but have it work right to left
instead of left to right? Here's what I'm trying to do, and any help would
be appreciated:

I have a list of domain names, and I'm trying to extract the TLD from each
one. The problem I'm running into is that some of them are 4th level domains
(i.e. ci.dallas.tx.us) and others have TLDs longer than 3 characters (i.e.
domain.info). Here's what I have, and it seems to work, but if there are any
TLDs out there that I'm not thinking of that are longer than 4 characters,
this will error out on me:

=TRIM(RIGHT(A11,LEN(A11)-FIND(".",A11,LEN(A11)-5)))

If anyone knows of a way to just make the FIND start looking on the right,
that would make it simpler and less prone to future errors....

Thanks to all.

Mike
 
J

Jason Morin

Another alternative:

=RIGHT(A1,MATCH(".",MID(A1,1+LEN(A1)-ROW(INDIRECT("1:"&LEN
(A1))),1),0)-1)

Array-entered.

HTH
Jason
Atlanta, GA
 
M

mikelee101

Thanks Frank,
I had done it in VBA, but that slows the calculation down something fierce.
This page is exactly what I'm looking for.

Thanks again.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top