#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Extract from string

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
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
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Extract from string

Niek,
works great thank you
Mark
Niek Otten wrote:
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
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract text from String Dan Excel Worksheet Functions 8 July 1st 06 12:39 PM
List File Properties - Author SS Excel Worksheet Functions 1 June 23rd 06 04:56 PM
Extract Numbers from Alpha-Numeric String MrBill Excel Worksheet Functions 1 November 2nd 05 05:44 PM
Extract sub string sixbeforedawn Excel Worksheet Functions 2 October 24th 05 09:50 AM
How do you extract numbers from a string of chacters in a cell (E. blackbeemer Excel Worksheet Functions 6 November 12th 04 09:00 AM


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"