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



[TABLE="width: 488"]
<tbody>[TR]
[TD]UDL_CXDAD_Full Episode_Dallas-Ft. Worth DMA[/TD]
[/TR]
[TR]
[TD]CXTY_Full Episode Player_Geotarget Tyler DMA_8/13-8/19[/TD]
[/TR]
[TR]
[TD]Makegood_CXTY_Full Episode_Geotarget Tyler DMA[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

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