Private Sub Worksheet_Change(ByVal Target As Range)
Dim P As Range, t, i&
Application.ScreenUpdating = False
Application.EnableEvents = False 'désactive les évènements
With [A1].CurrentRegion.Resize(, 22) 'colonnes A:V
Set P = Intersect(Target.EntireRow, .Cells)
With Intersect(P, [D:F,H:H,J:J,L:L,R:S,V:V])
.Replace ",", Chr(130), xlPart 'remplacement de la virgule
.Replace "EI", "" 'RAZ
.Replace Chr(130), "." 'restitution du séparateur décimal
End With
For Each P In P.Areas 'si entrées multiples (copier-coller ou effacement)
t = P 'matrice, plus rapide
For i = 1 To UBound(t)
If Right(t(i, 3), 2) = "EI" Then
t(i, 4) = t(i, 4) & "EI": t(i, 5) = t(i, 5) & "EI": t(i, 6) = t(i, 6) & "EI"
t(i, 8) = t(i, 8) & "EI": t(i, 10) = t(i, 10) & "EI": t(i, 12) = t(i, 12) & "EI"
t(i, 18) = t(i, 18) & "EI": t(i, 19) = t(i, 19) & "EI": t(i, 22) = t(i, 22) & "EI"
End If
Next i
P = t 'restitution
Next P
End With
Application.EnableEvents = True 'réactive les évènements
End Sub