array

P

peter

Hi,
I have an array with 3 elements, 0,1,2

0=a
1=b
2=c

I have a range of data, a1:a100
Is there an easy way to test if
activecell.value is contained in array

if a1=b returns true
if a2=x returns false

or do I have to do a for/next loop for each cell

thanks
peter
 
A

Alan Beban

=IF(ISNA(MATCH(A1,{"a","b","c"},0)),FALSE,TRUE)
entered in Cell B1 and filled down to B100

Alan Beban
 

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