how to sense -1 value at any cell in a column
If you write down in column A, try this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Columns("A:A"), Target) Is Nothing Then
If Target.Value < -1 Then
MsgBox "there is < -1"
Else
MsgBox "there is = -1"
End If
End If
End Sub
Kind Regards,
Andrzej
amrezzat napisał(a):
hi guys
i have a column like that
a
1
22
341
42
5
and each time i add more number to it
how to sense after i type the number is it -1 or not??
i mean if i write -1 and then i press enter or change the active cell
,if there is a way to check what i just wrote and see if it -1 or not??
|