Excel combine all cells if they contain specific Text

dshafique

Board Regular
Joined
Jun 19, 2017
Messages
171
Hi everyone, I have been troubled with this task in Excel. I have a cell with unstructured IDs. They are not seperated by a delimiter, or space, and I need to pick out every instance of G-ROBOTXXXXX (G-Robot followed by 5 characters)
example:
S-1-5-21-1451601339-2568154591-3116655374-200646G-ROBOTGP004S-098568675G-ROBOTP00988

The cells vary in length, and are all over the place. Some cells have 2 instances of G-ROBOTXXXXX, some have 5, some have none. I want to be able to pull out all the instances and keep them in seperate cells if possible. I can do this manually, but there are hundreds of rows and will take me days.

I would appreciate any help or direction from you guys.

thanks in advance!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
How about
=IFERROR(MID(SUBSTITUTE($A2,"G-ROBOT","|#|G-ROBOT",COLUMN(A1)),FIND("|#|",SUBSTITUTE($A2,"G-ROBOT","|#|G-ROBOT",COLUMN(A1)))+3,12),"")
Filled down & across
Change the |#| if need to something that will never be found in the data
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top