Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

Extracting Text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 16 Mar 2006 20:07 GMT
I have cells that contain data in this format:
ANIMALS-PETS-DOGS-BROWN
ANIMALS-PETSFARM-DOGS-BEAGLES
ANIMALS-PET-CATS-TABBY

What I need is the ability to extract only the last word after the last
hyphen so my cells look like this:
BROWN
BEAGLES
TABBY
I am getting lost
daddylonglegs - 16 Mar 2006 20:17 GMT
With your data in A1

=REPLACE(A1,1,LOOKUP(LEN(A1)+1,FIND("-",A1,ROW(INDIRECT("1:"&LEN(A1))))),""
Michael - 16 Mar 2006 20:32 GMT
Thanks that one did the trick for me.

> With your data in A1
>
> =REPLACE(A1,1,LOOKUP(LEN(A1)+1,FIND("-",A1,ROW(INDIRECT("1:"&LEN(A1))))),"")
CLR - 16 Mar 2006 20:21 GMT
=MID(A1,FIND("-",A1,FIND("-",A1,FIND("-",A1,1)+1)+1)+1,99)

Vaya con Dios,
Chuck, CABGx3

> I have cells that contain data in this format:
> ANIMALS-PETS-DOGS-BROWN
[quoted text clipped - 7 lines]
> TABBY
> I am getting lost
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.