Here is the code I have. I dont want it to run until C20 cell value is changed.You would use a Worksheet_Change event procedure (see: Worksheet.Change event (Excel)).
If you provide us with more details, we can help you come up with the code.
Private Sub Worksheet_Change(ByVal Target As Range)
Static Counter As Long
If Counter = 0 Then
If Application.Min([C76:C80]) < 0 Then MsgBox "This causes a negative slope. Check your slope or enter it manually. See cells C76 to C80 for negative values, and then overide the slope at the anchor that is negative to the slope desired", vbExclamation
Counter = 1
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Static Counter As Long
If Not Intersect(Target, Range("C20")) Is Nothing Then
If Counter = 0 Then
If Application.Min([C76:C80]) < 0 Then MsgBox "This causes a negative slope. Check your slope or enter it manually. See cells C76 to C80 for negative values, and then overide the slope at the anchor that is negative to the slope desired", vbExclamation
Counter = 1
End If
End If
End Sub
Thanks,Private Sub Worksheet_Change(ByVal Target As Range) Static Counter As Long If Not Intersect(Target, Range("C20")) Is Nothing Then If Counter = 0 Then If Application.Min([C76:C80]) < 0 Then MsgBox "This causes a negative slope. Check your slope or enter it manually. See cells C76 to C80 for negative values, and then overide the slope at the anchor that is negative to the slope desired", vbExclamation Counter = 1 End If End If End Sub