The code below is acting as expected...
HOWEVER, any time multiple cells in (or among) columns J, K, and L are selected and the values cleared (Delete key) I get the error: "Run-time error '13': Type mismatch" and clicking Debug highlights the red code below.
Any ideas?
- If user enters "Personal" in any cell in Column J, cells on the same row in Columns K & L auto-fill with "Personal"
- If user enters either "Misc." or "Other Meals" in Column K, cells on the same row in column L auto-fill with the same word
HOWEVER, any time multiple cells in (or among) columns J, K, and L are selected and the values cleared (Delete key) I get the error: "Run-time error '13': Type mismatch" and clicking Debug highlights the red code below.
Any ideas?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("J:J")) Is Nothing Then
[COLOR=#ff0000]If Target.Value = "Personal" Then[/COLOR]
Target.Offset(0, 1).Value = Target.Offset(0, 0).Value
Target.Offset(0, 2).Value = Target.Offset(0, 0).Value
End If
End If
If Not Intersect(Target, Range("K:K")) Is Nothing Then
If Target.Value = "Other Meals" Then
Target.Offset(0, 1).Value = Target.Offset(0, 0).Value
End If
End If
If Not Intersect(Target, Range("K:K")) Is Nothing Then
If Target.Value = "Misc." Then
Target.Offset(0, 1).Value = Target.Offset(0, 0).Value
End If
Else
Set Target = Nothing
End If
End Sub
Last edited: