find a character location in a string starting from the right

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have to find the second instance from the right in strings with a variable
number of segments delimited by ".", where the final string is reliably 6
characters and the remaining segments are of variable length.

Example string:
mypage.My_Details.Yorkshire_and_Humber_region_page.Accountants_shown_ways_of_going_for_Olympic_gold_.136277

From which I want to extract:
Accountants_shown_ways_of_going_for_Olympic_gold_.136277
 
=MID(A1,FIND("~",SUBSTITUTE(A1,".","~",LEN(A1)-LEN(SUBSTITUTE(A1,".",""))-1))+1,255)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Another way....

=REPLACE(A1,1,LOOKUP(LEN(A1)-7,FIND(".",A1,ROW(INDIRECT("1:"&LEN(A1))))),"")
 
Back
Top