Hello All, needing help with the replace function. If a cell has the following contents (906, 910, 911) my macro is not replacing the numbers with text. I have tried taking the commas out, and have same issue. After the macro is completed. I try to do the replace function manually and it will not find the data. I then tried to just see if excel would find the data, and it found it. Then did the replace function again and it will now replace it after finding it.. I have duplicated this result several times. It will not replace until I run the find manually. Makes no sense to me.
I am trying to get it to change each number in the cell to different text. I.E. (906, 910, 911) would translate to (Hello, Help, Please)
Code in macro:
Columns("L:L").Select
Selection.Replace What:="906", Replacement:="Hello", LookAt:= _
xlWhole, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="910", Replacement:="Help", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="911", Replacement:="Please", LookAt:= _
xlWhole, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Thanks in advance.
Bookmarks