Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nir Nir is offline
external usenet poster
 
Posts: 36
Default Find Many String options in ONE String

Hi,
I have an array where some of the cells contain strings and some are blank.
I am looking for a formula that finds a string from the array within another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result should
be "BBC"
===
ABC

CC
BBC
===


thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Find Many String options in ONE String

Suppose you have these values in a range of cells:

D1 = ABC
D2 = (empty)
D3 = CC
D4 = BBC

A1 = ADFGBBC IIO

Formula entered as an array using the key combination of CTRL,SHIFT,ENTER
(not just ENTER):

=INDEX(D1:D4,MATCH(TRUE,ISNUMBER(SEARCH(IF(D1:D4< "",D1:D4),A1)),0))

Biff

"Nir" wrote in message
...
Hi,
I have an array where some of the cells contain strings and some are
blank.
I am looking for a formula that finds a string from the array within
another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result
should
be "BBC"
===
ABC

CC
BBC
===


thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nir Nir is offline
external usenet poster
 
Posts: 36
Default Find Many String options in ONE String

Biff
It works, you saved me hell of a time (not sure i understand how it
works.......)

thanks



"Biff" wrote:

Suppose you have these values in a range of cells:

D1 = ABC
D2 = (empty)
D3 = CC
D4 = BBC

A1 = ADFGBBC IIO

Formula entered as an array using the key combination of CTRL,SHIFT,ENTER
(not just ENTER):

=INDEX(D1:D4,MATCH(TRUE,ISNUMBER(SEARCH(IF(D1:D4< "",D1:D4),A1)),0))

Biff

"Nir" wrote in message
...
Hi,
I have an array where some of the cells contain strings and some are
blank.
I am looking for a formula that finds a string from the array within
another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result
should
be "BBC"
===
ABC

CC
BBC
===


thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nir Nir is offline
external usenet poster
 
Posts: 36
Default Find Many String options in ONE String

Biff
i would like to use it in case there are no space in the string.
use the example below if:
D1=II
D2=IO
D3=IIO

so formula resualt will be only "IIO"

thanks


"Biff" wrote:

Suppose you have these values in a range of cells:

D1 = ABC
D2 = (empty)
D3 = CC
D4 = BBC

A1 = ADFGBBC IIO

Formula entered as an array using the key combination of CTRL,SHIFT,ENTER
(not just ENTER):

=INDEX(D1:D4,MATCH(TRUE,ISNUMBER(SEARCH(IF(D1:D4< "",D1:D4),A1)),0))

Biff

"Nir" wrote in message
...
Hi,
I have an array where some of the cells contain strings and some are
blank.
I am looking for a formula that finds a string from the array within
another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result
should
be "BBC"
===
ABC

CC
BBC
===


thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Find Many String options in ONE String

Nir wrote...
Biff
i would like to use it in case there are no space in the string.
use the example below if:
D1=II
D2=IO
D3=IIO

so formula resualt will be only "IIO"


Difficult. D1 = "II" and D2 = "IO" are substrings of D3 = "IIO". You'd
need to set up your search so it located IIO first, then either II or
IO. So if you're searching for any of these substrings in a string
named x, try

=LOOKUP(1000000,SEARCH(D1:D3,x),D1:D3)

which doesn't require array entry.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Find Many String options in ONE String

Try this array formula:

=INDEX($D$D, ROUND( 1 / MOD( MIN( LEN( SUBSTITUTE( A1, D1:D4, "" ) ) + 1 /
ROW( D1:D4) ), 1 ), 0 ) )
--
Regards,
Luc.

"Festina Lente"


"Nir" wrote:

Biff
i would like to use it in case there are no space in the string.
use the example below if:
D1=II
D2=IO
D3=IIO

so formula resualt will be only "IIO"

thanks


"Biff" wrote:

Suppose you have these values in a range of cells:

D1 = ABC
D2 = (empty)
D3 = CC
D4 = BBC

A1 = ADFGBBC IIO

Formula entered as an array using the key combination of CTRL,SHIFT,ENTER
(not just ENTER):

=INDEX(D1:D4,MATCH(TRUE,ISNUMBER(SEARCH(IF(D1:D4< "",D1:D4),A1)),0))

Biff

"Nir" wrote in message
...
Hi,
I have an array where some of the cells contain strings and some are
blank.
I am looking for a formula that finds a string from the array within
another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result
should
be "BBC"
===
ABC

CC
BBC
===


thanks




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Find Many String options in ONE String

Sorry, I made some mistakes while copying the formula, here it is (I hope):

=INDEX($D:$D, ROUND( 0.1 / MOD( MIN( LEN( SUBSTITUTE( A1, D1:D4, "" ) ) +
0.1 / ROW( D1:D4 ) ), 1 ), 0 ) )

--
Regards,
Luc.

"Festina Lente"


"PapaDos" wrote:

Try this array formula:

=INDEX($D$D, ROUND( 1 / MOD( MIN( LEN( SUBSTITUTE( A1, D1:D4, "" ) ) + 1 /
ROW( D1:D4) ), 1 ), 0 ) )
--
Regards,
Luc.

"Festina Lente"


"Nir" wrote:

Biff
i would like to use it in case there are no space in the string.
use the example below if:
D1=II
D2=IO
D3=IIO

so formula resualt will be only "IIO"

thanks


"Biff" wrote:

Suppose you have these values in a range of cells:

D1 = ABC
D2 = (empty)
D3 = CC
D4 = BBC

A1 = ADFGBBC IIO

Formula entered as an array using the key combination of CTRL,SHIFT,ENTER
(not just ENTER):

=INDEX(D1:D4,MATCH(TRUE,ISNUMBER(SEARCH(IF(D1:D4< "",D1:D4),A1)),0))

Biff

"Nir" wrote in message
...
Hi,
I have an array where some of the cells contain strings and some are
blank.
I am looking for a formula that finds a string from the array within
another
string and resualts the string found.

e.g find within the array below a string in "ADFGBBC IIO" == result
should
be "BBC"
===
ABC

CC
BBC
===


thanks




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
Find $ in a string of text and return numbers Craig Excel Discussion (Misc queries) 5 September 13th 06 10:42 PM
Find last word in a string clearwaterdave Excel Discussion (Misc queries) 8 July 28th 06 07:01 PM
Excel - Find & Replace text in a string bklim Excel Worksheet Functions 1 June 14th 05 06:42 AM
Find nth instance of a character in a string Francis Hayes (The Excel Addict) Excel Discussion (Misc queries) 7 January 21st 05 03:44 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 12:20 AM.

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"