Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Search for different values

I want to be able to reference a cell that has text separated by comma's, and
place a value in the neighboring cell if one of several values is found:

ie, list of values could be: BA, GO, GOP, IA, LSE, RC, RRO, TO, TOP, TSP

and I would want to identify it if it contains one of the following : GO,
GOP, LSE, TO

I am thinking that using the Search function within a bunch of nested IF
statements might work, but though I would put this out there to see if there
were some more intelligent solutions.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Search for different values

Hi,

The easiest way would be to enter the individual items you want to check for
in a range like G1:G4 and with the thing you want to look at in A1

=SEARCH(G1:G4,A1)
--
Thanks,
Shane Devenshire


"dascooper" wrote:

I want to be able to reference a cell that has text separated by comma's, and
place a value in the neighboring cell if one of several values is found:

ie, list of values could be: BA, GO, GOP, IA, LSE, RC, RRO, TO, TOP, TSP

and I would want to identify it if it contains one of the following : GO,
GOP, LSE, TO

I am thinking that using the Search function within a bunch of nested IF
statements might work, but though I would put this out there to see if there
were some more intelligent solutions.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Search for different values

What kind of result do you want?

This array formula** will return TRUE if any of the variables are found
within the string.

List the variables in a range of cells:

X1 = GO
X2 = GOP
X3 = LSE
X4 = TO

=OR(ISNUMBER(SEARCH(X1:X4&",",A1&",")))

If *any* cell in the range X1:X4 is empty the formula will return TRUE even
if none of the other entries match. You can account for that by using this
array** version:

=OR(ISNUMBER(SEARCH(IF(G1:G4="",1,G1:G4&","),A1&", ")))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"dascooper" wrote in message
...
I want to be able to reference a cell that has text separated by comma's,
and
place a value in the neighboring cell if one of several values is found:

ie, list of values could be: BA, GO, GOP, IA, LSE, RC, RRO, TO, TOP, TSP

and I would want to identify it if it contains one of the following : GO,
GOP, LSE, TO

I am thinking that using the Search function within a bunch of nested IF
statements might work, but though I would put this out there to see if
there
were some more intelligent solutions.




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
SEARCH A NAME ON COL A & SUM THE VALUES ON COL B Vic Excel Worksheet Functions 3 September 27th 06 12:12 AM
allow search on ranges of values gloss Excel Worksheet Functions 0 May 9th 06 07:08 AM
Search multiple values to return single values JANA Excel Worksheet Functions 8 October 27th 05 04:26 PM
search after values Willy Excel Discussion (Misc queries) 0 May 25th 05 09:02 PM
search after values Willy Excel Discussion (Misc queries) 0 May 22nd 05 08:52 AM


All times are GMT +1. The time now is 05:30 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"