Last piece of text in a string (multiple lengths)

  • Thread starter Thread starter Bob Freeman
  • Start date Start date
B

Bob Freeman

I am trying to construct a formula which will return the last complete text
string from a cell of text
e.g. 'I like football' will return 'football'
The string to be returned can be of any length.

Many thanks
 
In other words, you want to extract the last word in the string?

Try this:

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))
 
Perfect - thank you

T. Valko said:
In other words, you want to extract the last word in the string?

Try this:

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))
 

Ask a Question

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.

Ask a Question

Back
Top