Ago
01-10-2009, 06:55 AM
i have a variable called cellvalue that i want to match with a list.
my "betaversion" i use today is :
if cellvalue like xx or cellvalue like xy or cellvalue like xz... and so on..
as you might understand this is not a good way of doing it.
if i put all the values in a sheet can i match them without making a loop.
i understand that i can do like:
x=1
while x < LastRow
if cellvalue Like Sheet("List").Range("A" & x).Value Then
...do stuff...
end if
x= x+1
wend
but loops is not very efficient.
what could i do instead?
my "betaversion" i use today is :
if cellvalue like xx or cellvalue like xy or cellvalue like xz... and so on..
as you might understand this is not a good way of doing it.
if i put all the values in a sheet can i match them without making a loop.
i understand that i can do like:
x=1
while x < LastRow
if cellvalue Like Sheet("List").Range("A" & x).Value Then
...do stuff...
end if
x= x+1
wend
but loops is not very efficient.
what could i do instead?