excel vba - vba to add quotes around cell content using CHR(34) throws "sub not defined" error -


I'm tired of writing a macro so that each cell in column B has the citation digit complete

Edit: It now works

  Sub AddQuotesToCells () Dim Rng as long range ("Sheet1") Long Row with Long Row Sheets as Range Range, LastRow = . ("A" and "."). End (XLEEP) .roet RNG = .Renz ("B2: B" and last line) in RNG cell for each cell. Value = Chatch (34) & amp; Cell & amp; amp;     

it is not CHAR () < / Code> this is Chr () . Also, did you . category line before set rng = category ... ?

More formula questions:
Change

  rng.Formula = "=" & amp; Cher (34) & amp; "B2" & amp; Cher (34) & amp; ""  

by

  rng.Formula = "" "" "" "" & Chr (34) & amp; "& Amp ; "& Amp;" B2 "&" & Amp; "& Amp; Chr (34) &" "" "" ""  

Comments