C
chris12345
Hi,
I have a macro where I want to replace a certain string with another
string. However, when I put in the macro
Cells.Replace What:="(1 markets)", Replacement:="(1 market)", LookAt:=
_
xlPart, SearchOrder:=xlByColumns, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
it does nothing, but if I change SearchOrder:=xlByColumns to
SearchOrder:=xlByRows, then it works fine.
Can anyone explain why? If it helps, the cells in which the strings to
be replaced can be found are all in 3 cells merged together, with the
string in the left most of the 3 cells (all 3 cells are on the same
row).
Thanks!
I have a macro where I want to replace a certain string with another
string. However, when I put in the macro
Cells.Replace What:="(1 markets)", Replacement:="(1 market)", LookAt:=
_
xlPart, SearchOrder:=xlByColumns, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
it does nothing, but if I change SearchOrder:=xlByColumns to
SearchOrder:=xlByRows, then it works fine.
Can anyone explain why? If it helps, the cells in which the strings to
be replaced can be found are all in 3 cells merged together, with the
string in the left most of the 3 cells (all 3 cells are on the same
row).
Thanks!