Search and find in a string of text

Dojorgen

Board Regular
Joined
Mar 1, 2018
Messages
59
Hey guys hoping you could help me out with this:

String of text:
'CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=373 TYPE/A="RECIPE" RES_ID/A="E.299.30" PORT_ID/B=1 MBC_ID1/A="419253901.000" MBC_ID2/A="BLANK"'

Search for:
Line of text looking to pull search for "RECIPE"

If true then results:
then results the "E.299.30"
and next column "419253901.000"
 
This should handle more than enough extractions based on your most recent description, tested up to 5 extractions.

Assuming data starts at A1, formula in B1 copied down and across as far as needed:


Book1
ABCDEF
1CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=373 TYPE/A="RECIPE" RES_ID/A="E.299.30" PORT_ID/B=1 MBC_ID1/A="419253901.000" MBC_ID2/A="BLANK"E.299.30419253901.000
2CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="BLANK" MBC_ID2/A="419260011.000"E.242.50419260011.000
3CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="BLANK" MBC_ID2/A="BLANK"E.242.50
4CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="419253901.000" MBC_ID2/A="419260011.000"E.242.50419253901.000419260011.000
5CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="419253901.000" MBC_ID2/A="419260011.000" MBC_ID3/A="012345" MBC_ID4/A="678901"E.242.50419253901.000419260011.000012345678901
Sheet325 (2)
Cell Formulas
RangeFormula
B1=IFERROR(TRIM(MID(SUBSTITUTE(SUBSTITUTE(REPLACE($A1,1,SEARCH("Recipe",$A1)+6,""),"""BLANK""",""),CHAR(34),REPT(" ",255)),(COLUMNS($B1:B1)+COLUMNS($B1:B1)-1)*255,255)),"")
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Silly me...just a bit shorter:


Book1
ABCDEF
1CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=373 TYPE/A="RECIPE" RES_ID/A="E.299.30" PORT_ID/B=1 MBC_ID1/A="419253901.000" MBC_ID2/A="BLANK"E.299.30419253901.000
2CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="BLANK" MBC_ID2/A="419260011.000"E.242.50419260011.000
3CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="BLANK" MBC_ID2/A="BLANK"E.242.50
4CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="419253901.000" MBC_ID2/A="419260011.000"E.242.50419253901.000419260011.000
5CMD/A="RES_ACTIVATE" MID/A="vfei2W0206" MTY/A="C" TID/U4=419 TYPE/A="RECIPE" RES_ID/A="E.242.50" PORT_ID/B=2 MBC_ID1/A="419253901.000" MBC_ID2/A="419260011.000" MBC_ID3/A="012345" MBC_ID4/A="678901"E.242.50419253901.000419260011.000012345678901
Sheet325 (2)
Cell Formulas
RangeFormula
B1=IFERROR(TRIM(MID(SUBSTITUTE(SUBSTITUTE(REPLACE($A1,1,SEARCH("Recipe",$A1)+6,""),"""BLANK""",""),CHAR(34),REPT(" ",255)),(COLUMNS($B1:B1)*2-1)*255,255)),"")


Same description as Post 11 above.
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,050
Members
449,206
Latest member
Healthydogs

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