1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Sub Test()
Dim Plage As Range
Dim Cel As Range
Dim Tbl
Dim I As Integer
Tbl = Array("Hauteur", "Largeur", "Longueur")
With Worksheets("Feuil1")
For I = 0 To UBound(Tbl)
Set Plage = .Range(.Range("C_ProductId"), .Cells(Rows.Count, .Range("C_ProductId").Column).End(xlUp))
Set Cel = Plage.Find(Tbl(I), , xlValues, xlPart)
If Not Cel Is Nothing Then
Set Plage = .Range(.Cells(Cel.Row, Cel.Column), .Cells(Cel.Row, Columns.Count).End(xlToLeft))
Plage.NumberFormat = "@"
For Each Cel In Plage: Cel.Value = Replace(Cel.Value, ",", "."): Next Cel
Else
MsgBox "Pas trouvé !"
End If
Next I
End With
End Sub |