How do i insert "If function" in a macro?

M

mudraker

madcat

Note IF statement tests are case sensitive

if range("a2") = "Y" then
do something
end if


or

if range("a2") = "Y" then
do something
elseif range("b3")="N" then
do something else
else
do some other thing
end if


you can also use Select Case

Select case range("a1")
case "Y"
do something
case "N"
do somr other thing
case "T"
do something else
end selec
 
Top