Thread
:
How can I isolate the last two words in a text string?
View Single Post
#
3
Posted to microsoft.public.excel.misc
Niek Otten
external usenet poster
Posts: 3,440
How can I isolate the last two words in a text string?
=RIGHT(A1,LEN(A1)-FIND("\",SUBSTITUTE(A1," ","\",LEN(A1)-LEN(SUBSTITUTE(A1,"
",))-1)))
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
"Steve Gibbs" <Steve
wrote in message
...
I have found a formula that works great for retrieving the last word from a
string of charactors in a cell.
If the string in Cell A1 is: "How do I return the last two words?", the
formula below will give me the last word. (Isn't it nice sometimes to
have
the last word?)
{=RIGHT(A1,MATCH(" ",MID(A1,LEN(A1)-ROW(INDIRECT("1:"&LEN(A1))),1),0))}
This will return "words?".
How can I modify this or, what other formula will return, "two words?".
I think this is a very slick formula, but I don't quite understand it well
enough to figure out how to modify the match to find the second blank.
Note: I found this formula in Osborne, THE COMPLETE REFERENCE EXCEL 2000
by
Kathy Ivens and Conrad Carlberg.
Reply With Quote
Niek Otten
View Public Profile
Find all posts by Niek Otten