Hi all,
I am wondering, does select case in VBA, can it do case this or that like an if statement.
This way it has flexibility, because without it, it doesn't have much flexibility as an if statement.
I tried to do select this or that but it doesn't work.
example code:
this is the normal case statement:
case statement with multiple condition: this one does not work.
I am wondering, does select case in VBA, can it do case this or that like an if statement.
This way it has flexibility, because without it, it doesn't have much flexibility as an if statement.
I tried to do select this or that but it doesn't work.
example code:
this is the normal case statement:
Code:
pick = cell(i, "F")
SELECT CASE pick
CASE a
do this
CASE b
do this
CASE c
do this
END CASE
case statement with multiple condition: this one does not work.
Code:
pick = cell(i, "F")
SELECT CASE pick
CASE a or 1
do this
CASE b or 2
do this
CASE c or 3
do this
END CASE