Hi All
I have a bunch of data and I need a why to test if a set of conditions are met, and then do more code if different sets are.
For example, 3 variables which are in A1, B1 & C1.
I was wondering if there was a way to get a select case type code to work but each case is testing each value in the A1, B1, C1 above.
Completely made up code below which explains what I am after:
I know how to do standard select cases and how to use ranges etc the above is just a made up example to get my point across.
Or is there another way to do the above? Basically test multiple variables combined to execute different sets of code, without of course doing massive If statements or select cases within select cases etc.
Any help would be greatly appreciated.
Thanks
I have a bunch of data and I need a why to test if a set of conditions are met, and then do more code if different sets are.
For example, 3 variables which are in A1, B1 & C1.
I was wondering if there was a way to get a select case type code to work but each case is testing each value in the A1, B1, C1 above.
Completely made up code below which explains what I am after:
Code:
Select Case
Case Is A1 = 1 and B1 = 2 and C1 = 3
Do something here
Case Is A1 = 2 and B1 = 1 and C1 = 4
Do something else here
Case Is A1 = 5 and B1 = 6 and C1 = 1
Do something different here
End Select
I know how to do standard select cases and how to use ranges etc the above is just a made up example to get my point across.
Or is there another way to do the above? Basically test multiple variables combined to execute different sets of code, without of course doing massive If statements or select cases within select cases etc.
Any help would be greatly appreciated.
Thanks