How to Insert Double or Single Quotes
To Create New Quoted Values from Unquoted Values
- Column A contains the names.
- Put the following formula into Column B
= """" & A1 & """"
- Copy Column B and Paste Special -> Values
Using a Custom Function
Public Function Enquote(cell As Range, Optional quoteCharacter As String = """") As Variant Enquote = quoteCharacter & cell.value & quoteCharacterEnd Function
=OfficePersonal.xls!Enquote(A1)
=OfficePersonal.xls!Enquote(A1, "'")
To get permanent quoted strings, you will have to copy formula values and paste-special-values.
Assuming your data is in column A, add a formula to column B
="'" & A1 & "'"
and copy the formula down. If you now save to CSV, you should get the quoted values. If you need to keep it in Excel format, copy column B then paste value to get rid of the formula.
Easier steps:
- Highlight the cells you want to add the quotes.
- Go to Format–>Cells–>Custom
- Copy/Paste the following into the Type field: \"@\" or \'@\'
- Done!