Check if value in list
I have a column in a hidden worksheet that has a bunch of values
vertically downward. Say I have a variable that stores a single
value. I want to see if that value exists in that column in another
worksheet. How would I do this in VBA?
So if Worksheet "Sheet2" has in Column "G" the values vertically JOE,
SAM, PETE, MIKE, BILL, SUE (this list could change, grow, shrink) and
I have a variable that has "JIM" in it, I want to see if it's in
Column "G" returning whether it is or not. Kind of like
If UCase(VariableName) in "JOE,SAM,PETE,MIKE,BILL,SUE" then
....
Thanks.
JR
|