For the following code,
If Sheets(\"sheet1\").Range(\"A1\").Value = \"option_1\" Then
Sheets(\"sheet1\").Range(\"A1\").Value = \"option_2\"
ElseIf Sheets
A bit too late, but in the specific example the fastest should be to store the option as a number and just increment it when needed. The Custom Number Format of the cell can be changed to "option_"0;;;
for the number to show as option_#.
In almost all cases I expect the Select Case
to be a just a tiny bit slower and to be compiled to something very similar to If Else statements.
That is not the case in the two examples because they do slightly different things. In the first example, each of the If statements will look for Sheet "sheet1" and get the value of Range "A1", but the Select Case
example gets that value only once in the beginning and then compares that value. This should cause the Select Case
example to be few times faster when the cell value is not "option_1".