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 many if statements can you nest - Guide
- How to check pc power consumption in windows 10 - Guide
- Check soft - Download - Finance
- Huawei check code - Guide
- How to check ps4 controller battery - Guide
1 reply
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
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