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))
 
Back
Top