Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Economical grouping of lengths out of much longer lengths | Excel Worksheet Functions | |||
Two hyperlinks in 1 piece of text? | Excel Discussion (Misc queries) | |||
truncating text strings of different lengths | Excel Discussion (Misc queries) | |||
lookup and choose wih multiple tables of unequal column lengths | Excel Discussion (Misc queries) | |||
How to move one piece of text to another column | Excel Discussion (Misc queries) |