I am writing a macro for MS Excel in VBA. Inside a sub-routine I have a set of conditions to be satisfied for a particular task to be executed. Which of the following method will be optimum from running time and memory point of view?
Method 1:
If condition_1 then
If condition_2 then
If condition_3 then
....
End If
End If
End If
OR
Method 2:
If condition_1 And condition_2 And ..... then
....
End If
If I have an Else statement for any of the conditions, I have to go for method 1 to implement it. But I don't have an Else statement for any of the conditions, so both methods stand on equal levels for accomplishing the task. I just want to know which one would be better in case of run-time and memory?