If condition Then x = 1
If condition Then x = 1: a = ""
If condition Then
x = 1
a = "xxx"
End If
If condition Then
x = 1
a = "xxx"
Else
x = 2
a = "yyy"
End If
If condition1 Then
x = 1
a = "xxx"
ElseIf condition2 Then
x = 2
a = "yyy"
End If
If condition1 Then
x = 1
a = "xxx"
ElseIf condition2 Then
x = 2
a = "yyy"
ElseIf condition3 Then
x = 3
a = "zzz"
Else
x = 4
a = "xyz"
End If
Select Case variable
Case 1, 3, 6 To 9
x = 1
a = "xxx"
Case Is <= 100
x = 2
a = "yyy"
Case Is <= 1000
x = 3
a = "zzz"
Case Else
x = 4
a = "xyz"
End Select
Select Case True
Case x < 100
a = "xxx"
Case a = "yyy", a = "zzz"
x = 2
Case Else
x = 4
a = "xyz"
End Select
myResult = IIf(myInput<>vbNullString, myInput + 2, vbNullString)
With Sheet1.Range("A:A")
Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(xlUp)).Offset(0, 2).FormulaR1C1 = "=IF(RC1 <> """", RC1+RC2, """")"
End With