G
Guest
The first half of my cell is unneccesary, then comes a slash ( / ) and I need
everything after that
everything after that
and I need everything after that
Rick Rothstein (MVP - VB) said:The difference between our methods being when no slash character is
present in the cell.
Rick
....Dave Thomas said:Here's yet another solution:
This one is not limited to 1024 characters. It returns everything.
If no "/" is found it returns the empty string. It could be modified to
return everything if no slash is found.
Like the others it returns everything after the first slash found.
=RIGHT(A1,MAX(LEN(A1)-FIND("/",A1&"/"),0))
Harlan Grove said:...Dave Thomas said:Here's yet another solution:
This one is not limited to 1024 characters. It returns everything.
If no "/" is found it returns the empty string. It could be modified to
return everything if no slash is found.
Like the others it returns everything after the first slash found.
=RIGHT(A1,MAX(LEN(A1)-FIND("/",A1&"/"),0))
It may be another alternative, but it's suboptimal compared to Teethless
mama's [adapted]
=REPLACE(A1,1,FIND("/",A1&"/"),"")
And the MID formula others have mentioned could be adapted for arbitrary
number of characters up to max string size as
MID(A1,FIND("/",A1&"/")+1,32768)
As for returning the entire string if it contains no /,
=MID(A1,1+COUNTIF(A1,"*/*")*FIND("/",A1&"/"),32768)
Dave Thomas said:Hardcoding numbers like 1024, 32768 in formulas is asking for trouble.
What happens if MS changes the maximum cell length to 65536 in the next
release?
....Harlan Grove said:=REPLACE(A1,1,COUNTIF(A1,"*/*")*FIND("/",A1&"/"),"")
to return A1.
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.