I've seen many examples of finding and replacing a specific text string. However, I want to find a word within a cell, then replace the entire cell with another word.
The searched cells may contain more than one word beyond the one I'm looking for.
I have this:
Sub FindData1ReplaceData2()
ActiveSheet.Activate
Cells.Replace What:="A", Replacement:="B", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
My cell may contain 'abcd'. This routine just replaces the 'a' with 'b' and the cell becomes 'bbcd'. I only need 'b' in the cell.
Seems pretty easy, but can't find the solution...
The searched cells may contain more than one word beyond the one I'm looking for.
I have this:
Sub FindData1ReplaceData2()
ActiveSheet.Activate
Cells.Replace What:="A", Replacement:="B", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
My cell may contain 'abcd'. This routine just replaces the 'a' with 'b' and the cell becomes 'bbcd'. I only need 'b' in the cell.
Seems pretty easy, but can't find the solution...