Greater than, less than statement
give this a try
Sub test()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
If ws.Range("A1") 500 And ws.Range("A1") < 999 Then
MsgBox "ok"
Else
MsgBox "not ok"
End If
End Sub
--
Gary
"DP7" wrote in message
...
I have a nested if statement, I am trying to write, if a1 greater than 500
but less than 999, then do X. I can't seem to get that part to work. Any
Ideas ???
Thanks
|