Extracting Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
With your data in A1

=REPLACE(A1,1,LOOKUP(LEN(A1)+1,FIND("-",A1,ROW(INDIRECT("1:"&LEN(A1))))),""
 
=MID(A1,FIND("-",A1,FIND("-",A1,FIND("-",A1,1)+1)+1)+1,99)

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top