Bonjour,
Essaies ce code
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error Resume Next
If Not Intersect(Target, Range("B11:B" & Range("B" & Rows.Count).End(xlUp).Row)) Is Nothing Then
Target.Value = UCase(Mid(Target.Value, 1, InStr(1, Target.Value, " ") + 1)) & LCase(Mid(Target.Value, InStr(1, Target.Value, " ") + 2, Len(Target.Value) - InStr(1, Target.Value, " ") + 1))
Range("A11:N" & Range("B" & Rows.Count).End(xlUp).Row).Sort key1:=Range("B11"), header:=xlYes
End If
'Chercher la ligne avant celle sans numéro et se décaler '
Range("A10").End(xlDown).Offset(1, 2).Select
For i = 11 To Range("B" & Rows.Count).End(xlUp).Row
Range("A" & i).Value = i - 10
Next i
Application.EnableEvents = True
End Sub
Cordialement