View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Eric Eric is offline
external usenet poster
 
Posts: 1,670
Default How to add "'" into string?

Within macro, I would like to replace "1'" with varable + "', there is an
error.
Please see the following code for details

Cells.Replace What:="1'", Replacement:=Range("A2").Value&"'",
LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False

Does anyone have any suggestions on how to solve this coding?
Thanks in advance for any suggestions
Eric