I am running code inVBA
to test if the cell to the right is less than 0, and if it is, then to make the active cell 0. This should run when the cell is entered. Here's what I have so far:
Private Sub worksheet_change(ByVal target As Range)
If Not Intersect(target, Range("c7:c27")) Is Nothing Then isNegative
End Sub
and then
Sub isNegative()
Dim cell As Range
If ActiveCell.Offset(1, 0).Value < 0 Then
ActiveCell.Value = 0
End If
End Sub
But, what I assume is happening is that it checks the data before calculating. How do I fix this?