IF statements referencing an absolute value or a range of values
Public Sub validate()
Dim validation As Integer
Dim row As Integer
Dim col As Integer
row = 5
col = 1
validation = ActiveSheet.Cells(row, col).Value
If validation -5 And validation < 5 Then
MsgBox ("OK")
Else
MsgBox ("Validation Error")
End If
End Sub
skaminski wrote:
Does anyone know how to create a conditional statement for the following
situation?
If the value in a particular cell is between -5 and 5, then return a message
that says "ok", otherwise return a message that says "validation error".
|