View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default How do I replace the last entire word in text cells?

Array entered (CTRL+SHIFT+ENTER), this will work:

=LEFT(A1,LEN(A1)-MATCH(" ",MID(A1,LEN(A1)-ROW(INDIRECT("1:"&LEN(A1)))+1,1),0))

Change the reference to A1 to which ever cell you want.

--
Regards,
Dave


"George" wrote:

I understand the REPLACE command but it seems restricted to characters or
bytes. I this case, I want to replace the last word in all cells but the word
is always different (ie. varying number of characters).

Thanks in advance!