Maybe :
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, strMsg As String
Set rng = Intersect(Target, Range("C3:C" & Me.Rows.Count)) 'Change "C3:C" as needed
If Not rng Is Nothing Then
If rng.Cells.Count = 1 Then
If Len(rng.Value) = 7 Then
If Mid$(rng.Value, 1, 1) <> "V" Then strMsg = strMsg & "First character should be V" & vbCrLf
If Mid$(rng.Value, 2, 1) <> "-" Then strMsg = strMsg & "Second character should be -" & vbCrLf
If Not Mid$(rng.Value, 3, 1) Like "[A-z]" Then strMsg = strMsg & "Third character should be alphabetic" & vbCrLf
If Not Mid$(rng.Value, 4, 4) Like "####" Then strMsg = strMsg & "Last four characters should be numeric values" & vbCrLf
Else
If Len(rng.Value) <> 0 Then strMsg = "Incorrect length" & vbCrLf
End If
If Len(strMsg) Then MsgBox strMsg
End If
End If
End Sub
Bookmarks