Extract text between two strings

knokenet

New Member
Joined
Feb 22, 2011
Messages
2
Hi,

Can someone help me?

In column A I have some thousands of cells with lots of html text.
In each cell along the text there's a flash embed code which I need to extract and place in the next column. The code start with "object" and ends with "/object". How do I extract only this code and paste in column B?

THANKS for the help...

Knokenet
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Assuming your data is in cell A1

=MID(A1,SEARCH("object",A1)+6,SEARCH("/object",A1)-SEARCH("object",A1)+6)

That will extract data between your 2 criteria, just drag down for the rest
 
Last edited:
Upvote 0
Use a FIND to get the digit number for both "object" and "/object". Then MID to get everything in between.

=MID(A146,FIND("object",A146,1)+7,FIND("/object",A146,1)-FIND("object",A146,1)-8)
 
Upvote 0
Thank you Phanmore! Had to play a bit with the numbers to include all the text string, but it worked!

Thank you cjcobra, Phanmore's code was sufficient for me.

Best,

Knokenet
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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