Skip to content

Instantly share code, notes, and snippets.

@ateneva
Last active April 15, 2018 10:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ateneva/5aac1003500de182e93ece038cb048cf to your computer and use it in GitHub Desktop.
Enclose string in single quotes
Sub EncloseinQuotes()
Dim Cell As Range
Dim IP As String
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'written by Angelina Teneva, March 2017
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With ActiveSheet
For Each Cell In Range("A2:A" & ActiveSheet.UsedRange.Rows.Count)
IP = Cell.Value
Cell.Value = "''" & IP & "',"
Next Cell
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment