Try this code
Option Explicit
Sub replace()
Dim lrow As Long, i As Long, j As Long
Dim findtext As String, replacetext As String
Application.ScreenUpdating = False
With Worksheets("Reference")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To lrow
findtext = .Range("A" & i).Value
replacetext = .Range("B" & i).Value
For j = 1 To Worksheets.Count
If Worksheets(j).Name <> "Reference" Then
Worksheets(j).Cells.replace findtext, replacetext, xlWhole
End If
Next j
Next i
End With
MsgBox "Done"
Application.ScreenUpdating = True
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
Bookmarks