Hi,
I'm sure there is a very simple answer but I've been searching for 25 minutes and I've had no luck.
In my VBA code, I've got an integer i = 20 (for example).
In my worksheet, I've got a column of values (e.g. 4, 6, 12, 20, 22, 45)
I want to write an IF statement to see if i is in that column. If it is, I'll run <something>
If that fails, I want to check if i is in another column of values (e.g. 2, 3, 23, 46) and if it is, then I'll run <something>
Otherwise error.
Do I need a loop for this? Or can I compare the value to a 'range' of cells in a worksheet?
Bookmarks