Monday, May 03, 2010

Excel format cells with quotes

Here is how to format a text cell so it will have either double or single quotes. I needed to import a csv file with text fields formatted with double quotes. There are probably some more reasons why you might need to do this.

  • Edit the cell or column you need to format
  • choose format cell
  • Select Custom from the bottom
  • use the formula \"@\"

The @ symbol represents the text in the field. You can wrap any text field with any character but make sure to escape it.


Stumble Upon CodePyro

10 comments:

Anonymous said...

Thank you! Needed that!

Anonymous said...

Great tip Thank you

Anonymous said...

Thank you very much!!

Anonymous said...

Very handy, thank you!

Anonymous said...

doesn't work with numbers

Anonymous said...

If you want to format both (text and numbers), use \"#\";\"@\" as format.
Source http://www.databison.com/custom-format-in-excel-how-to-format-numbers-and-text/

Anonymous said...

Thank you so much! You just saved me SO much time!

ha said...

wow- works like magic

Anonymous said...

It appears to work in Excel but when I open the document in Notepad, it has double quotes instead of single. Anyone know why?

sriram said...

This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.

Ms excel training in chennai

Post a Comment