1 2 3 4 5 6 7 8 9 10 11 12 13
| Sub ChangeValues()
Dim i As Long
Dim lastRow As Long
lastRow = Cells(Rows.Count, "L").End(xlUp).Row
For i = 16 To lastRow
Range("AD" & i & ":FI" & i).Replace What:=Cells(i, "L").Value, Replacement:=Cells(1, "L").Value, LookAt:=xlWhole
Range("AD" & i & ":FI" & i).Replace What:=Cells(i, "M").Value, Replacement:=Cells(1, "M").Value, LookAt:=xlWhole
Range("AD" & i & ":FI" & i).Replace What:=Cells(i, "N").Value, Replacement:=Cells(1, "N").Value, LookAt:=xlWhole
Next i
MsgBox "Traitement terminé !"
End Sub |
Partager