I tried to run the vb code below to replace a list of strings with another but it doesnt work. For example, on Sheet2, in the A column I have a list of strings that I want to be found and replaced with the list of strings in B. So in A1 I have Apple and in B1 I have Banana. Now anywhere on Sheet1 there is an Apple I want Banana. The issue with the code is that it will only replace cells that say only Apple with Banana. I have many cells on sheet 1 that say AppleSauce in cells that should say BananaSauce. Can this find and replace be manipulated to find and replace an exact string and not exact cells. Thank you for the help!
Code:
Sub Macro1()
Dim i As Integer
Dim FindStr As String
Dim RepStr As String
For i = 1 To 20
FindStr = Sheet2.Range("A" & i).Value
RepStr = Sheet2.Range("B" & i).Value
Sheet1.Cells.Replace What:=FindStr, Replacement:=RepStr
Next i
End Sub