I have a number of text files which contain radio programme titles where each item is on a separate line, e.g.:
15 by 15 15 Minute Drama Adrian Mole Afternoon Drama Afternoon Reading etc
I would like to add double quotes as delimiters to each line, e.g.:
"15 by 15" "15 Minute Drama" "Adrian Mole" "Afternoon Drama" "Afternoon Reading" etc
I thought I might be able to do this in Excel but not been able to find a way. I really don't mind whether the solution is Excel based or something else, as long as I don't have to do it manually.
Can anyone help please?
Yes. You can import double quotation marks using CSV files and import maps by escaping the double quotation marks. To escape the double quotation marks, enclose them within another double quotation mark.
You can put quotes, dashes and spaces in the CSV file. Fields that contain a special character (comma, newline, or double quote), must be enclosed in double quotes. If a field's value contains a double quote character it is escaped by placing another double quote character next to it.
Click Data > Get External Data > From Text to select a file and open the Text Import Wizard. Click Next button to continue. Select one or more delimiters that fits your data. You can see if the data is separated correctly in the Data preview section.
Here's a way to do it without formulas or macros:
(from http://www.lenashore.com/2012/04/how-to-add-quotes-to-your-cells-in-excel-automatically/)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With