Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel Remove text before string for multiple possible strings

With Excel, I need to find and remove some text from all cells in a column. Using the example below I need get all instances of DEV* and BA* into another column.

Example data in a column:
Data
Dan Smith DEV001
Bob Jones BA005
Bob Jones2 BA 005

Needed Result
DEV001
BA005
BA 005

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This example works partially but not with multiple possible matches.

=TRIM(RIGHT(A2, LEN(A2) - SEARCH("DEV", A2)))

How can this be done with multiple possible matches?

>Solution :

Try using this

• Formula used in cell B1

=REPLACE(A1,1,MAX(IFERROR(FIND({"DEV","BA"},A1),""))-1,"")

FORMULA_SOLUTION

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading