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
- Check soft - Download - Finance
- How to check if someone is spying on my whatsapp - Guide
- Speaker check code - Guide
- How to check pc power consumption in windows 11 - Guide
- How to check nearby friends on facebook - 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