Thread: Error in Code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim May Jim May is offline
external usenet poster
 
Posts: 430
Default Error in Code

With:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("F5:F2005")) Is Nothing _
And Target.Offset(0, -3).Value = "Sale of Item" Or
Target.Offset(0, -3).Value = "Shrinkage" Then
Target.Value = Target.Value * -1
End If
Application.EnableEvents = True
End Sub

When I select from Col C either Sale of Item or Shrinkage and enter say 5 in
my Col F my intention (with the code above is to convert the 5 in Cell F12
(say) to -5.
But that is not happening.
Can someone assist me?
TIA,