Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, msg As String
If Intersect(Target, Columns(1)) Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each r In Intersect(Target, Columns(1))
If r.Value <> "" Then
If Not r.Value Like "V-[A-Za-z]####" Then
MsgBox "Invalid Entry", vbCritical, r.Value
r.ClearContents
End If
End If
Next
Application.EnableEvents = True
If Len(msg) Then MsgBox msg, , "Invalid entry"
End Sub
I guess you can't apply the code, so attach a workbook showing where(range) to apply.
Bookmarks