dhgjcdsghj
dhgjcdsghj

Reputation: 53

How to add quotes around a each value of a cell of dates in excel?

I have a long list of dates but I need them to have quotation marks on the outside. How can I do this quickly without manually doing it. I tried a couple of things that I saw online such as formatting the cells as """@""" but this just giving me a @.

What I have and what I would like.

enter image description here


to...

enter image description here

Any help would be appreciated

Upvotes: 4

Views: 14519

Answers (3)

user10207283
user10207283

Reputation: 1

Often quotes are added to each cell in a CSV file for efficient uploading to website. so reformatting the cells will not work as CSV won’t recognize this.

This is the only way I’ve found to work:

Open a new sheet (we’ll call this “Sheet2”).

Insert this function into the first cell: =(“”””&Sheet2!A1)&”””” (This is assuming that you want quotes around cell A1 from your original spreadsheet).

Hit ENTER and you should see your text with quotes around it in the first cell of Sheet2. Now you can apply this same function wherever you please. If you want to do a whole row or column, simply drag the little green corner in the first cell in Sheet2 in whatever direction you want auto filled.

Now THIS IS IMPORTANT. You must select and copy these quoted cells and “Paste special..” > “Values”. This converts the functions to actual text that you can save into a CSV and use later.

I hope this helps whoever may visit this page in search of answers.

Cheers!

Upvotes: 0

L42
L42

Reputation: 19737

Display both text and numbers To display both text and numbers in a cell, enclose the text characters in double quotation marks (" ") or precede a single character with a backslash ("\").

Source: Creating custom number formats.

So your format should be: \"dd/mm/yyyy\"

Upvotes: 0

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60289

Try:

=TEXT(A1,"\""dd/mm/yyyy\""")

Upvotes: 3

Related Questions