Extract a specific word from Sentence

earthworm

Well-known Member
Joined
May 19, 2009
Messages
759
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Below is the Code which I need to extract from

C021_CBVMKR

I need to extract the above from below

C021_Enquiry_CBVMKR

I tried the below formula but its not working :( Please help

=LOOKUP(2^15,SEARCH(C1,A1),A1)


C021_Enquiry_CBVMKR#VALUE!C021_CBVMKR

<tbody>
</tbody>
 
I asked if the format was always the same? You answered
Code:
[COLOR=#333333][COLOR=#333333]C021_Enquiry_CBVMKR
[/COLOR][/COLOR][COLOR=#333333][COLOR=#333333]C021_Enquiry-CBVMKR
[/COLOR][/COLOR][COLOR=#333333][COLOR=#333333]C021 _ Enquiry _ CBVMKR
[/COLOR][/COLOR][COLOR=#333333][COLOR=#333333]C021 - Enquiry - CBVMKR
[/COLOR][/COLOR][COLOR=#333333][COLOR=#333333]C021-Enquiry-CBVMKR
[/COLOR][/COLOR][COLOR=#333333][COLOR=#333333]C021-Enquiry Check -CBVMKR

Format does vary but the ending is same.[/COLOR][/COLOR]

Now you have _-

Are there any other possibilities?

i think text to column function is the only option , because u r now going to vba.
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I think the main point is to find out what the various delimiters are, in order to offer a solution.
 
Upvote 0
If they are the only de-limiters? Try

=LEFT(A1,4)&"_"&MID(SUBSTITUTE(SUBSTITUTE(A1,"_-","_"),"-","_"),FIND("_",SUBSTITUTE(SUBSTITUTE(A1,"_-","_"),"-","_"),8)+1,99)
 
Last edited:
Upvote 0
0;0;0;0;1;1;1;1;0;0;0;0;0;0;0;1;0;0;0;0;1;1;0;0;0;0;0;0;0

How can i extract the last bold numbers occurring after every last 1 in the series . This last "1" is dynamic . I.E After every last "1" i need to extract that data
 
Upvote 0
0;0;0;0;1;1;1;1;0;0;0;0;0;0;0;1;0;0;0;0;1;1;0;0;0;0;0;0;0

How can i extract the last bold numbers occurring after every last 1 in the series . This last "1" is dynamic . I.E After every last "1" i need to extract that data

You replace "*1;" (without quotes) with nothing.
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,462
Members
449,163
Latest member
kshealy

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