I am trying to iterate through and change serial numbers of a worksheet based on the updated table of old serial numbers with their corresponding new serial numbers. Here is my code.
Sub what_am_I_doing()
Dim i As Integer
Dim sht As Worksheet
Set sht = Worksheets("RtgCmt")
For i = 2 To 7049
sht.Cells.Replace what:=Range("D" & i).Value, Replacement:=Range("B" & i).Value, _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next i
End Sub
Sub what_am_I_doing()
Dim i As Integer
Dim sht As Worksheet
Set sht = Worksheets("RtgCmt")
For i = 2 To 7049
sht.Cells.Replace what:=Range("D" & i).Value, Replacement:=Range("B" & i).Value, _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next i
End Sub