title: vba to add quotes around cell content using CHR(34) throws "sub not defined" error
body: <p>I am tiring to write a macro so that every cell in column B gets <code>quote</code> marks around entire string in the cell </p>
  
  <p>I get the error <code>Sub or Function not defined</code> and the CHAR(34) is highlighted</p>
  
  <p>Thanks</p>
  
  <p>Edit: This works now</p>
  
  <pre><code>Sub AddQuotesToCells()
  Dim rng As Range, cell As Range
  Dim LastRow As Long
  
  With Sheets("sheet1")
      LastRow = .Range("A" &amp; .Rows.Count).End(xlUp).Row
  
      Set rng = .Range("B2:B" &amp; LastRow)
  
      For Each cell In rng
          cell.Value = Chr(34) &amp; cell &amp; Chr(34)
      Next
  End With
  </code></pre>
  
  <p>End Sub</p>