vba excel if code example
Example 1: vba if else
If condition_1 Then
result_1
ElseIf condition_2 Then
result_2
...
ElseIf condition_n Then
result_n
Else
result_else
End If
Example 2: vba if and
If LWebsite = "TechOnTheNet.com" And LPages <= 10 Then
LBandwidth = "Low"
Else
LBandwidth = "High"
End If