Q:

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

I am tiring to write a macro so that every cell in column B gets quote marks around entire string in the cell 
I get the error Sub or Function not defined and the CHAR(34) is highlighted
Thanks
Edit: This works now
Sub AddQuotesToCells()
Dim rng As Range, cell As Range
Dim LastRow As Long

With Sheets("sheet1")
    LastRow = .Range("A" & .Rows.Count).End(xlUp).Row

    Set rng = .Range("B2:B" & LastRow)

    For Each cell In rng
        cell.Value = Chr(34) & cell & Chr(34)
    Next
End With

End Sub

A:

It is not CHAR() it is Chr(). Also, did you forget the . before the range at line Set rng = range...?
And for the formula question:
Change
rng.Formula = "=" & CHAR(34) & "B2" & CHAR(34) & ""

By
rng.Formula = "=""""""" & Chr(34) & "&" & "B2" & "&" & Chr(34) & """"""""

