VBA MOD01 Case statement
Case statement
Public Sub Simple_If()
Dim myText As String
myText = Range("B3").Value
Select Case myText
Case 1 To 200
Range("C3").Value = "Good"
Case 0
Range("C3").Value = ""
Case Is > 200
Range("C3").Value = "Excellent"
Case Else
Range("C3").Value = "Bad"
End Select
End Sub
Comments
Post a Comment