LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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,


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error in this code [email protected] Excel Worksheet Functions 2 December 5th 06 05:21 AM
Getting error in code Jim May[_4_] Excel Programming 4 September 20th 04 03:12 PM
Error in my code? Matt Excel Programming 0 June 22nd 04 05:43 PM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"