Find Search function

baggarwal

Well-known Member
Joined
Jul 10, 2002
Messages
591
Hi All:

In the current column is the data I pull. The second column extracts text from it. Can someone please show me a formula that I can put in the desired column that will produce the result desired.
Current Desired
0107-01 - TLEU_Dec 06 TLEU
0207-01 - 441ZZ1_TLEU_Feb 07 TLEU
36-0107-02 - VIJE_Dec 06 VIJE
0207-01 - 441ZZ1_TLEU_Feb 07 TLEU
0407-01 - TLEU_Svcs Fee TLEU
0207-02 - 441ZZ2_VIJE - Feb 07 VIJE
0307-01 - TLEU_Feb 07 TLEU
0307-02 - VIJE_Feb 07 VIJE
0407-02 - VIJE_Svcs Fee VIJE
0507-01 - TLEU_Apr 07 TLEU
0507-02 - VIJE_Apr 07 VIJE
0607-01 - TLEU_ZZ1 TLEU

Basically I want to extract VIJE and TLEU from the long text.
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Provided your sample is inclusive of all possible formats, try this:

Code:
=IF(ISERROR(MID(A1, SEARCH(" - ",A1)+3, 1)*0),MID(A1,SEARCH(" - ",A1)+3,4),MID(A1,SEARCH("_",A1)+1,4))

Where A1 is the cell containing the text you want to search.
 
Upvote 0
Can you please explain how you generated this formula and how each function embedded is put together to produce the end result.
 
Upvote 0
Try...

=LOOKUP(9.99999999999999E+307,FIND({" TLEU_"," VIJE_"}," "&A2&"_"),{"TLEU","VIJE"})

However, it looks like TLEU and VIJE will not occur anywhere else within the text string. If this is the case, the following would suffice...

=LOOKUP(9.99999999999999E+307,FIND({"TLEU","VIJE"},A2),{"TLEU","VIJE"})

Note that FIND is case-sensitive. If you don't want the formula to be case-sensitive, replace FIND with SEARCH.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,839
Members
451,673
Latest member
wella86

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