View Single Post
  #5   Report Post  
 
Posts: n/a
Default

Hi all,
I thought I am the best in Excel and know all the functions. BUT now I
think I am a newbie after looking at the numourous posts in this NG.

I am using following formula in my sheet. However I could not
understand it at all.
May I request if someone can explain me how it works?


=SEARCH("^^^",SUBSTITUTE(A1,"abc","^^^",(LEN(A1)-LEN(SUBSTITUTE(A1,"abc","")))/LEN("abc")))


Also if I need the second last occurance or third last occurance, how
do I modify it.

Actually, I need to extrect the text between last two occurances of
"\". There may many alphanumaric cherecters (text) before and after
these occurances. The "\" itself appears many times in the same string.

I really appreciate the help by you people.

Nathpai.


Peo Sjoblom wrote:
Something like


=SEARCH("^^^",SUBSTITUTE(A1,"abc","^^^",(LEN(A1)-LEN(SUBSTITUTE(A1,"abc","")))/LEN("abc")))

Regards,

Peo Sjoblom

"REMnLYN" wrote:

How can I determine the starting position of the last occurrence of

specific
text within a longer string of text? For example, the text "abc"

occurs last
in the string "1abc2abc3abc" at position 10.