Dear All,
I've been trying to create an automatic check that will tell me when any value in the column CB turns negative.
I found the following code on the internet but I'm not able to make it work.
Could someone please help me!
Thanks,
Simona
I've been trying to create an automatic check that will tell me when any value in the column CB turns negative.
I found the following code on the internet but I'm not able to make it work.
Could someone please help me!
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Range("$CB$8:$CB$500").Cells Is Nothing Then
Application.EnableEvents = False
If Range("$CB$8:$CB$500").Value < 0 Then
MsgBox "Negative Value. Plese correct the amount before continuing."
End If
Application.EnableEvents = True
End If
End With
End Sub
Simona