Customising Export From XLS to CSV

G

Guest

How do I go about adding Double quotes around each field in excel?
At the moment it is exporting data like this
Title,Name,Surname,etc

I would like it to export like this
"Title","Name","Surname","etc

Thanks
 
J

Jason Morin

Select the desired cells and run this macro:

Sub AddQuotes()
Dim cell As Range
For Each cell In Selection
With cell
.Value = Chr(148) & .Value & Chr(148)
End With
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top