0

I have a column called 'cArticle' in excel, containing data in below format. I have a requirement to extract in another column the code that is in brackets. Ex- Z1A,F5C,etc

cArticle
Molecular Dispersion (Z1A)
Acrona Perse (F5C)
Leco Spers (HLP)
Cullar Dipters (LPP)

I have managed to get it partially working by using the below formula, but it still returns with values with the closing brackets. How can I modify it to get the desired results?

RIGHT(cArticle,4)

Thank you in advance!

2
  • 2
    SUBSTITUTE(your_formula,")","") Commented Mar 25, 2021 at 19:13
  • Is the code you need always at the end of the value? And is it always 3 characters long? Commented Mar 25, 2021 at 19:25

2 Answers 2

1

If the string always ends with (XXX) and the content in the brackets is always 3 digit. You can also try:

=LEFT(RIGHT(cArticle,4),3)
Sign up to request clarification or add additional context in comments.

Comments

0

If your code is always at the farthest right and is only 3 characters long, you can use formula as below

=SUBSTITUTE(RIGHT(cArticle,4),")","")

However if your code is not always at the farthest right and may be more or less than 3 characters than you can use formula below, which will work in all cases even if there is no code present

=IFERROR(MID(cArticle,FIND("(",cArticle)+1,FIND(")",cArticle)-FIND("(",cArticle)-1),"No Code")

sample1

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.