Bonjour,
Une proposition sans fichier de makayel7
Bon réveillon.
Cdlt.
Option Explicit
Option Private Module
Public Sub Traitement()
Dim wb As Workbook
Dim ws As Worksheet, wsS As Worksheet
Dim rng As Range, rng1 As Range, c As Range
Dim x As String, y As String, z As String
Application.ScreenUpdating = False
Set wb = ActiveWorkbook
Set wsS = wb.Worksheets("Onglet1")
Set rng = wsS.Range("B2:B" & wsS.Range("B" & Rows.Count).End(xlUp).Row)
For Each ws In wb.Worksheets
If ws.Name <> wsS.Name Then
For Each c In rng
If Not c = vbNullString Then
x = c.Value
y = LCase(Split(c.Value, "_")(1) & "_" & Split(c.Value, "_")(0))
z = "XX_" & Split(c.Value, "_")(1)
Set rng1 = ws.Range("B2:B" & ws.Range("B" & Rows.Count).End(xlUp).Row)
With rng1
.Replace What:=y, Replacement:=x, Lookat:=xlWhole, MatchCase:=True
.Replace What:=z, Replacement:=x, Lookat:=xlWhole, MatchCase:=True
End With
End If
Next c
End If
Next ws
Set rng = Nothing
Set ws = Nothing
Set wb = Nothing
End Sub