ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   array (https://www.excelbanter.com/excel-programming/275496-array.html)

peter

array
 
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

Alan Beban[_3_]

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

Alan Beban

peter wrote:
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




All times are GMT +1. The time now is 08:54 PM.

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