Private Sub Worksheet_Change(ByVal Target As Range)
Dim message As String, cellule As String
Dim i As Byte
If Not Application.Intersect(Target, Columns(1)) Is Nothing Then
message = 'Merci de respecter le format : AA123....'
cellule = Target.Address
If Len(Target) < 5 Then MsgBox message: Range(cellule).Activate
For i = 1 To Len(Target)
carac = Mid(Target, i, 1)
If i = 1 And IsNumeric(carac) Then MsgBox message: Range(cellule).Activate: Exit Sub
If i = 2 And IsNumeric(carac) Then MsgBox message: Range(cellule).Activate: Exit Sub
If i = 3 And Not IsNumeric(carac) Then MsgBox message: Range(cellule).Activate: Exit Sub
If i = 4 And Not IsNumeric(carac) Then MsgBox message: Range(cellule).Activate: Exit Sub
If i = 5 And Not IsNumeric(carac) Then MsgBox message: Range(cellule).Activate: Exit Sub
Next i
End If
End Sub