Find if a cell contains one of series of data

A

Andre Croteau

Hello,



I would appreciate a bit of help...

I have a column of 1000 email addresses say from A1:A1000

I have a series of text cells in a criteria range D1:D3 with the following
data " .com , .net and .org" That criteria range can be extended with
added data.

I would like to have a formula in column B that would show if the cell in
column A contains one of the items in the criteria range (give the results)
, and advise if not in criteria range

A B C
D
1 (e-mail address removed) .com
..com
2 (e-mail address removed) .org
..net
3 (e-mail address removed) "not in list"
..org
4 (e-mail address removed) .com


Thanks in advance

André
 
R

Ron Rosenfeld

Hello,



I would appreciate a bit of help...

I have a column of 1000 email addresses say from A1:A1000

I have a series of text cells in a criteria range D1:D3 with the following
data " .com , .net and .org" That criteria range can be extended with
added data.

I would like to have a formula in column B that would show if the cell in
column A contains one of the items in the criteria range (give the results)
, and advise if not in criteria range

A B C
D
1 (e-mail address removed) .com
.com
2 (e-mail address removed) .org
.net
3 (e-mail address removed) "not in list"
.org
4 (e-mail address removed) .com


Thanks in advance

André

The **array** formula:

=IF(ISNA(MATCH(TRUE,NOT(ISERR(FIND(
CritRng,A1))),0)),"not in list",INDEX(CritRng,
MATCH(TRUE,NOT(ISERR(FIND(CritRng,A1))),0)))

should do what you require.

To enter an **array** formula, after pasting or typing it into the formula bar,
hold down <ctrl><shift> while hitting <enter>. Excel will place braces {...}
around the formula.
--ron
 
A

Andre Croteau

Ron,

Very nice, thank you

André


Ron Rosenfeld said:
The **array** formula:

=IF(ISNA(MATCH(TRUE,NOT(ISERR(FIND(
CritRng,A1))),0)),"not in list",INDEX(CritRng,
MATCH(TRUE,NOT(ISERR(FIND(CritRng,A1))),0)))

should do what you require.

To enter an **array** formula, after pasting or typing it into the formula
bar,
hold down <ctrl><shift> while hitting <enter>. Excel will place braces
{...}
around the formula.
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top