Adding an "OR" condition to search String...

GGK

New Member
Joined
Oct 4, 2011
Messages
40
I have a search function that is pulling certain parts of data from a cell. I need to add an OR statement do to variances in the data that comes in.

The issue in question is in the SEARCH String.

Can anyone give advice on how to fix this?

=MID(A1,SEARCH("<FLAG="A1)+10,SEARCH(";red",A1,SEARCH("<FLAG="A1))

how can i change this and add an OR statement so that it can be ;red ;white ;blue

Thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
sorry.. got slammed yesterday... here is what i am trying to do:

I am getting paragraphs of data that i need to extract certain parts from. I will always need to pull a hyperlink; however there are a few different start and endpoints that i need to decipher from.

I'm currently using this formula that works with once constant start point (ENG=") and two variable end points (;JACK or ;JILL)


=MID(B2,SEARCH("ING END=",B2)+9,MIN(SEARCH(";JACK",MID(B2,SEARCH("ING END=",B2)+9,255)),SEARCH(";JILL",MID(B2,SEARCH("ING END=",B2)+9,255)))-1)

What should I do if i need to add another variable start point (ING AND=") and another Variable endpoint (;BILL)

Here is an example of the bundled code that i'm extracting the link from:

<SEA ENG="http://www.google.com/#1/1x100;ab=(best);bc=(thebest)?" abc abcdefg abcdefghij thealpha=no BETTER='12345'>
<SECOND Search ENG='YAHOO' ENG="http://www.yahoo.com/#2/101x200;ab=(2ndbest);cd=(almostbest)?">
*********>
<NOSCRIPT>
<SEA ENG="http://www.excite.com/exc/xyz=201x300;IGNORE=;NOTME=(never)?">
<ING ENG="http://www.findme.com/iam/whatisneeded/Thankyou=1x999;JACK=[stopit];BUCK=[BOBBY]?" igno Blasto==3450 ALT="friday"></A>
</NOCHANCE>
</IDONE>
 
Upvote 0
i keep forgetting that sometimes my code wont transfer over on the forum.. here is the lengthy code that needs to be isolated in the example above:

SEA ENG="http://www.google.com/#1/1x100;ab=(best);bc=(thebest)?" abc abcdefg abcdefghij thealpha=no BETTER='12345'>
<SECOND Search ENG='YAHOO' ENG="http://www.yahoo.com/#2/101x200;ab=(2ndbest);cd=(almostbest)?">
*********>
<NOSCRIPT>
<SEA ENG="http://www.excite.com/exc/xyz=201x300;IGNORE=;NOTME=(never)?">
<ING ENG="http://www.findme.com/iam/whatisneeded/Thankyou=1x999;JACK=[stopit];BUCK=[BOBBY]?" igno Blasto==3450 ALT="friday"
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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