P
Pat
The following portion of code has got the wrong amount of 'End If', 'End
With' etc, is it possible someone can see the fault with this?
Thanking you
Pat
For Each Target In rng1
sProd = Target.Parent.Cells(Target.Row, 26)
res = Application.Match(sProd, _
Worksheets("PList").Range("L30:L950"), 0)
If Not IsError(res) Then
With Worksheets("PList")
If IsNumeric(Target.Value) Then
Set rng2 = .Cells(res + 29, icol)
rng2.Value = rng2.Value - Target.Value
End If
End With
Else
MsgBox "Product Not found: " & sProd
End If
End With
Else
MsgBox Target.Address & " Caused an Error"
Resume Next
On Error Resume Next
End If
Next
With' etc, is it possible someone can see the fault with this?
Thanking you
Pat
For Each Target In rng1
sProd = Target.Parent.Cells(Target.Row, 26)
res = Application.Match(sProd, _
Worksheets("PList").Range("L30:L950"), 0)
If Not IsError(res) Then
With Worksheets("PList")
If IsNumeric(Target.Value) Then
Set rng2 = .Cells(res + 29, icol)
rng2.Value = rng2.Value - Target.Value
End If
End With
Else
MsgBox "Product Not found: " & sProd
End If
End With
Else
MsgBox Target.Address & " Caused an Error"
Resume Next
On Error Resume Next
End If
Next