View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Find Space from Right [in cell formula]


Hi,

To find the position in the string of last space use

=LEN(A1)-LEN(RIGHT(A1,LEN(A1)-SEARCH("@",SUBSTITUTE(A1,"
","@",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))))

or if you want the last word

=MID(A1,FIND(CHAR(22),SUBSTITUTE(A1," ",CHAR(22),LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,255)



Mike

"Jimbo213" wrote:


I found a Jan 5 2009 post to find the FIRST space from the right using the
InStrRev function. I'd like to incorporate this in a cell's formula, not a
VBA function.

Is that possible?

--
Thanks for your reply & assistance.
Jimbo213