Why the type mismatch error?

Closed
Fulicasenia Posts 1 Registration date Friday August 21, 2015 Status Member Last seen August 21, 2015 - Aug 21, 2015 at 08:19 AM
xpcman Posts 19530 Registration date Wednesday October 8, 2008 Status Contributor Last seen June 15, 2019 - Aug 21, 2015 at 12:27 PM
My question is in the comment in the code:

Private Sub Worksheet_Change(ByVal Target As Range)

On Error Resume Next

If Target.Cells.Count > 1 Or Target.Value <> "N/A" Then Exit Sub 'adding On Error
' Resume Next made this work, but why do I get a runtime error 13 type mismatch
' error on this line?

If Not Intersect(Target, Range("C10,C11,G10,G11,C17,C18,C21,C37,C38,C41,C42,C45,C46,C63,C64")) Is Nothing Then

If Not Intersect(Target, Range("C10,C11")) Is Nothing Then
Range(Target.Offset(0, 1), Target.Offset(0, 3)).Value = "N/A"
End If

etc etc etc
Related:

1 response

xpcman Posts 19530 Registration date Wednesday October 8, 2008 Status Contributor Last seen June 15, 2019 1,825
Aug 21, 2015 at 12:27 PM
0