Hi all,
I am trying to write a macro in excel that replaces every asterisk (*) in a column with a 1.
I run into a problem because VBA thinks that I am referring to the wild card string instead of an asterisk.
It replaces everything that I have selected with 1, rather than only the asterisks.
Here is what the code looks like now:
Columns("J:J").Select
Selection.Replace What:="*", Replacement:="1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Any suggestions?
Thanks,
Jane
I am trying to write a macro in excel that replaces every asterisk (*) in a column with a 1.
I run into a problem because VBA thinks that I am referring to the wild card string instead of an asterisk.
It replaces everything that I have selected with 1, rather than only the asterisks.
Here is what the code looks like now:
Columns("J:J").Select
Selection.Replace What:="*", Replacement:="1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Any suggestions?
Thanks,
Jane