I have a worksheet that requires a checkmark or N/A in many cells.
I set the font as Wingdins2, and have each of these cells with data validation (=Check,N/A)
I have the following in the worksheet:
Private Sub Worksheet_Change(ByVal Target As Range)
'Sets Checkmark or N/A (Wingdings2 font)
If Intersect(Target, Range("A14:A16,a22,c23,a24:a28,a33:a39,a45,a47:a49,y14:y37,y42,aa43:aa46,y47:y48,y53:y56,y61")) Is Nothing Then Exit Sub
If Target.Value = "Check" Then
Target.Value = "P"
ElseIf Target.Value = "N/A" Then
Target.Value = "S"
End If
End Sub
If Check is selected from dropdown it returns the value "P" (Wingdings2 Checkmark)
If N/A is selected from dropdown it returns the value "S" (Wingdings2
)
The code works well, but, if you attempt to delete more than one target cell contents, it throws and error, (Run-time error '13': Type Mismatch) and debug highlights the first If Target statement.
Any help with this will be greatly appreciated.
I set the font as Wingdins2, and have each of these cells with data validation (=Check,N/A)
I have the following in the worksheet:
Private Sub Worksheet_Change(ByVal Target As Range)
'Sets Checkmark or N/A (Wingdings2 font)
If Intersect(Target, Range("A14:A16,a22,c23,a24:a28,a33:a39,a45,a47:a49,y14:y37,y42,aa43:aa46,y47:y48,y53:y56,y61")) Is Nothing Then Exit Sub
If Target.Value = "Check" Then
Target.Value = "P"
ElseIf Target.Value = "N/A" Then
Target.Value = "S"
End If
End Sub
If Check is selected from dropdown it returns the value "P" (Wingdings2 Checkmark)
If N/A is selected from dropdown it returns the value "S" (Wingdings2
The code works well, but, if you attempt to delete more than one target cell contents, it throws and error, (Run-time error '13': Type Mismatch) and debug highlights the first If Target statement.
Any help with this will be greatly appreciated.