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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com