Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Last piece of text in a string (multiple lengths)

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Last piece of text in a string (multiple lengths)

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

Try this:

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

--
Biff
Microsoft Excel MVP


"Bob Freeman" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Last piece of text in a string (multiple lengths)

Perfect - thank you

"T. Valko" wrote:

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

Try this:

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

--
Biff
Microsoft Excel MVP


"Bob Freeman" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Last piece of text in a string (multiple lengths)

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Bob Freeman" wrote in message
...
Perfect - thank you

"T. Valko" wrote:

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

Try this:

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

--
Biff
Microsoft Excel MVP


"Bob Freeman" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Economical grouping of lengths out of much longer lengths Richard (a Builder not a Mathematician) Excel Worksheet Functions 1 January 19th 08 10:28 PM
Two hyperlinks in 1 piece of text? It Is Me Here Excel Discussion (Misc queries) 3 December 22nd 07 06:01 PM
truncating text strings of different lengths Funkey Excel Discussion (Misc queries) 7 March 29th 06 07:22 PM
lookup and choose wih multiple tables of unequal column lengths Lew Excel Discussion (Misc queries) 8 January 2nd 06 11:38 PM
How to move one piece of text to another column Needs Help Excel Discussion (Misc queries) 5 December 29th 04 02:41 PM


All times are GMT +1. The time now is 08:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"