Bonjour,
Je souhaiterai modifier une macro existante : (Le changement de code vers métier et métier vers code. Ne s'effectue plus pour la feuille entière (1) mais pour la colonne (M) de la feuille 1.) Merci d'avance
Sub code_vers_metier()
Application.ScreenUpdating = False
Dim Base As Worksheet
Dim Ref As Worksheet
Set Base = ActiveWorkbook.Worksheets(1)
Set Ref = ActiveWorkbook.Worksheets(2)
For i = 2 To Ref.UsedRange.Rows.Count
Base.Cells.Replace What:=Ref.Cells(i, 2).Value, Replacement:=Ref.Cells(i, 1).Value
Next i
Application.ScreenUpdating = True
End Sub
Sub metier_vers_code()
Application.ScreenUpdating = False
Dim Base As Worksheet
Dim Ref As Worksheet
Set Base = ActiveWorkbook.Worksheets(1)
Set Ref = ActiveWorkbook.Worksheets(2)
For i = 1 To Ref.UsedRange.Rows.Count
Base.Cells.Replace What:=Ref.Cells(i, 1).Value, Replacement:=Ref.Cells(i, 2).Value
Next i
Application.ScreenUpdating = True
End Sub