Find and return formula

julieni

New Member
Joined
Sep 9, 2009
Messages
3
Hoping to get some help. In a specific cell I'm looking to find text that begins with "CX" and return the remaining 4-5 letters behind it in a separate cell. The data that I'm looking for could be at the beginning or middle of text string. Basically, everything in red I'm looking to pull into a separate cell.
Thanks



UDL_CXDAD_Full Episode_Dallas-Ft. Worth DMA
CXTY_Full Episode Player_Geotarget Tyler DMA_8/13-8/19
Makegood_CXTY_Full Episode_Geotarget Tyler DMA

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi & welcome to MrExcel.
How about
=TRIM(LEFT(SUBSTITUTE(MID(A2,SEARCH("CX",A2),100),"_",REPT(" ",100)),100))
 
Upvote 0
.. another possibility
Code:
=REPLACE(LEFT(A2,FIND("_",A2,FIND("CX",A2))-1),1,FIND("CX",A2)-1,"")
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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