ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching cell for text value from list (https://www.excelbanter.com/excel-programming/382992-searching-cell-text-value-list.html)

[email protected]

Searching cell for text value from list
 
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!


Tom Ogilvy

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!





All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com