Help to check if else statements
Closed
Rosi
-
Jul 6, 2009 at 10:57 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 6, 2009 at 10:23 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 6, 2009 at 10:23 PM
Related:
- Help to check if else statements
- How to check liked posts on x - Guide
- How to check bios version - Guide
- Radiation check number - Guide
- Check mark in word - Guide
- Tmobile data check - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 6, 2009 at 10:23 PM
Jul 6, 2009 at 10:23 PM
try this
the range name should be one word so use "the_error"
the range name should be one word so use "the_error"
Sub test()
Dim rng As Range
Set rng = Range("the_error")
If rng >= 1 And rng < 10 Then
MsgBox "green range"
ElseIf rng >= 11 And rng < 16 Then
MsgBox "red range"
Else
MsgBox "invalid"
End If
End Sub