Using FIND in Extracting Text Strings

BMW87

New Member
Joined
May 25, 2014
Messages
3
I have a text string that I need to make multiple extractions from. I've managed to make use of MID & FIND in extracting what I want, only I'm getting too much. How do I delete the remainder of the text?

Text string:
ad.doubleclick.net/adj/activecom.tan/running/content;tile=1;channel=running;subchannel=nosubchannel;tanproduct=activecom;b2borb2c=b2c;feature=content;subfeature1=channel_home;subfeature2=nosubfeature2;subfeature3=nosubfeature3;sz=728x90;position=leader_top;dcopt=ist;eventid=;eventlisting=;country=;state=;typeid=;gender=ng;age=;skill=;traveler=n;demo_a=;estate=;etype=;esubtype=;ezip=;assetid=4e2fe191-1d0d-4b90-9d6d-8dc9b1c03717;dest_dma=;view=running;ord=845674?

Intended Extraction:
"running" (from channel=running)

The formula =MID(A2,76,FIND("channel",A2)-7) gives me the following:
running;subchannel=nosubchannel;tanproduct=activecom;b2borb2c=b2c;feature=content;subfeature1=channel_home;subfeature2=nosubfeature2;subfeature3=nosubfeature3;sz=728x90;position=leader_top;dcopt=ist;eventid=;eventlisting=;country=;state=;typeid=;gender=ng;age=;skill=;traveler=n;demo_a=;estate=;etype=;esubtype=;ezip=;assetid=4e2fe191-1d0d-4b90-9d6d-8dc9b1c03717;dest_dma=;view=running;ord=845674?

How do I get only the word I want? I have over 100 of these to create!





 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Does this work for you?

=MID(A2,FIND("channel",A2)+8,FIND(";",MID(A2,FIND("channel",A2)+8,20))-1)
 
Upvote 0
Gav it works for all but one of them & I've adapted the formula to take care of it. Thank you! Hopefully I understand what I'm looking at now & can adapt it for the other extractions I need to make.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,363
Messages
6,124,505
Members
449,166
Latest member
hokjock

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