Sorry about that. Check to see if this corrects the problem. I added:
I think that will correct your problem.
Sub ReplaceOldNames()
Dim rg1 As Range, nLastRow As Long, i As Long
'Set Range to Whole Worksheet "Sheet1"
Set rg1 = ActiveWorkbook.Worksheets("Sheet1").Range("A1").SpecialCells(xlCellTypeLastCell)
Set rg1 = ActiveWorkbook.Worksheets("Sheet1").Range("A1", rg1)
With ActiveWorkbook.Worksheets("Sheet4")
nLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 2 To nLastRow
rg1.Replace What:=.Cells(i, "C"), _
Replacement:=.Cells(i, "A"), _
LookAt:=xlWhole, _
MatchCase:=True
Next i
End With
End Sub
While I think that will correct your problem. If not, please upload your workbook, or a mockup of your workbook.
Bookmarks