View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Pull last word from a text string in Excel

On Mon, 25 Sep 2006 13:16:02 -0700, nmp wrote:

That worked!

Thank you!


You're welcome.

Note that if there are no spaces in the string, the formula will return an
error. If that needs to be avoided, use this instead:

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


--ron