Almost, After I added in the Dim for TargetRow, it all works great!
Thanks so much..
Final code:
-----------------
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Variant
Dim TargetRow As Variant
Set isect = Intersect(Target, Range("L2:L100"))
If Not isect Is Nothing Then
TargetRow = Target.Row
Range("G" & TargetRow) = Range("G" & TargetRow) - Range("L" & TargetRow)
End If
End Sub
---------------------
Per Jessen wrote:
As the result in isect can be either a range or 'Nothing', you have to use
Dim isect as Variant
Regards,
Per
Thanks for the reply..
I tried the code..get Compile Error: Variable not defined?
[quoted text clipped - 36 lines]
Thanks,
jlig
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200906/1