1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Sub mise_en_forme(Plage as range)
Dim CH, Rpl
Dim x As Integer
'Si la procédure est appelée avec un paramètre vide
If Plage is nothing then exit sub
CH = Array(" ", "'", "ë", "ê", "ï", "î", "ä", "â")
Rpl = Array("_", "_", "e", "e", "i", "i", "a", "a")
For x = 1 To UBound(CH)
'ActiveCell = Replace(ActiveCell, CH(x), Rpl(x))
Plage.Replace What:=CH(x), Replacement:=Rpl(x), LookAt:=xlPart, MatchCase:=True
Next x
End Sub
'Teste
mise_en_forme(Classeur1.Feuil1.Range("A1:A100")) |
Partager