I would like to make a simple tracking sheet for onhand stock Qty. Column F is the actual stock Qty will sum up all row cell value. the column incl. "export" (e.g. column H & J.) should be a negative value.
I have tried the following code.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("I:I"))
If Not (isect Is Nothing) Then
If Target.Value > 0 Then Target.Value = 0 - Target.Value
End If
End Sub
it will turn the column "I" to negative automatically. However, I will add more batches in the future. Is any way automatically turn negative if the column contains "export"?