Re: ElseIf Limit (VBA Excel)

Tx. I was just not sure about a limit. I agree about select case.
As I understand, in ElseIF, each condition needs to be tested whereas with Select Case, it jumps to the appropriate case and does not evaluate each one. This makes select case less system intensive and faster. (If I logically understand) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Re: ElseIf Limit (VBA Excel)

Not, they're not really different in this respect.
In a series of ElseIf's, each of the conditions is tested in turn until one is satisfied, then the corresponding code is executed and the rest of the ElseIf's is skipped.
In a Select Case statement, each of the Cases is tested in turn until the correct value is found, then the corresponding code is executed and the rest of the Cases is skipped.

Re: ElseIf Limit (VBA Excel)

So the only reason why the Select Case option is then prefered amongst programmers is because it has an easier structure to read and modify??? <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>