View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Searching cell for text value from list

=OR(ISNUMBER(FIND(A1:A4,$D$2)))

entered with Ctrl+shift+Enter (since this is an array formula) will tell you
if one of the items in the list in A1:A4 is contained in the string in D2.
The test is case sensitive.


If you want to know which one, then enter this with Ctrl+Shift+enter (since
this is an array formula) rather than just enter

=INDEX(A1:A4,SMALL(IF(ISNUMBER(MATCH("*"&A1:A4&"*" ,D2,0)),ROW(A1:A4),FALSE),1))
--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Hi, I have been trying for DAYS to get this problem solved. I have a
list of stock symbols and a cell which may contain a value from the
list.

For example


Stock Symbols

ADNC
SEDG
EDSW
TFDE

And a cell that could contain a value from the list.
Eg.

"I think SEDG is a very popular stock."

I have seen on the net "code", but I'm sure there must be a formula
for this! I would be interested to see what it is.

PLEASE HELP!