View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default Extract from string

Hi Mark,

In G3:
=IF(I3="",IF(ISERROR(FIND("ad",F3)),"","ad"),"")
In H3:
=IF(I3="",IF(ISERROR(FIND("con",F3)),"","con"),"")
In I3:
=IF(OR(ISERROR(FIND("ad",F3)),ISERROR(FIND("con",F 3))),"","ad, con")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mark" wrote in message oups.com...
| Hi All,
| I want to be able to extract some text from various strings and place
| it in the cell(s) to the right.
| I'm looking for combinations of Ad or Con or both Ad and Con
| similar to the following examples say in F3
| "Wants Ad,Die" or "Wants Con,Die"
| I want to be able to extract out the Ad or Con and place into G3
| for Ad or H3 for Con
|
| "Wants Ad,Con,Die"
| I want to be able to extract out Ad,Con and place into I3
|
| With this I'll be able to see who wants Ad only, Con only and Ad and
| Con combined.
| Some of the strings do not have Ad or Con at all.
|
| Thank you
| Mark
|