I use the following code to find and then reduce the value of a particular cell by one. The problem is that occasionally the value is already "0", so it goes to "-1" which messes up other calculations. Can anyone share with me a way to test for this before running the statement or a way to rewrite it so that it still reduces the value by one when appropriate, but can't go negative?
Code:
Dim Found As Range
Set Found = Sheets("By Model").Columns("B").Find(What:=Model, LookIn:=xlValues, LookAt:=xlWhole)
If Not Found Is Nothing Then
Range("H" & Found.Row).Activate
crowt = ActiveCell.Row
Cells(crowt, "H:H").Value = Cells(crowt, "H:H").Value - 1