View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Isolate text in a long url

"Rick Rothstein" wrote...
....
What if we just increase the number of spaces? Perhaps...

....

It's not GUARANTEED to work. Neither is substituting a 'magic'
character for the last / then searching for it, but it's arguably more
reliable. The only truly reliable ways to search for the last / in a
string using only built-in functionality (so no add-ins or udfs) is
the MATCH(2,1/(MID(s,ROW(1:32667),1)="/")) approach.

This is one place where OpenOffice Calc is well ahead of Excel. This
could be done in OOo Calc with

=REPLACE(A1;1;SEARCH("[^/]+$";A1)-1;"")