Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 740
DreadPirateRoberts Avatar asked Dec 11 '25 22:12

DreadPirateRoberts


1 Answers

Try using this

• Formula used in cell B1

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

FORMULA_SOLUTION

like image 158
Mayukh Bhattacharya Avatar answered Dec 16 '25 03:12

Mayukh Bhattacharya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!