1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Dim Tb, x As Long, y As Long
Dim chemin As String
With Sheets("nom de ta feuille")
'je passe par une variable tableau (plus rapide) car je ne
'connais pas la taille de ta feuille
Tb = .Range("A2").CurrentRegion
'en admettant que tes colonnes C et D contiennent des chiffres
'la ligne 1 contient les entêtes
.Range("C2:C" & UBound(Tb, 1)).NumberFormat = "0.00"
.Range("D2:D" & UBound(Tb, 1)).NumberFormat = "0.00"
For x = 2 To UBound(Tb, 1)
For y = 3 To 4
Tb(x, y) = Replace(Tb(x, y), ",", ".")
Next y
Next x
.Range("A1").Resize(UBound(Tb, 1), UBound(Tb, 2)) = Tb 'Application.Transpose(Tb)
End With
chemin = ActiveWorkbook.Path
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
chemin & "\" & ActiveWorkbook.Name, CreateBackup:=False
Application.DisplayAlerts = True |
Partager