Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding quotes in Excel 1

Status
Not open for further replies.

Mbowe

Programmer
Jan 6, 2006
35
0
0
I am converting excel file to cvs format by just copying, pasting and save as .cvs. It works fine but my boss would like me to add single or double quotes for aech field in csv file. Can you please help me?, the file has 3000 rows. I will be happy to either way, adding in excel before conversion or to csv file after conversion.

Technology does not drive change -- it enables change.
 


Hi,

Why the copy 'n' paste? Why not just Save As...???

What VALUE is added by enclosing the text with quotes?

Skip,
[sub]
[glasses] [red]Be Advised![/red] A man who jumps from a bridge in Paris, is…
INSANE! [tongue][/sub]
 
Skip

It's almost Friday, I was just dreaming and mixing with another task I am doing. I actually use save as and not copy and paste. The value of the fields needed to be enclosed with quotes is just a text (Example: "Marine Science Institute" or "192.122.1.38"). I hope I got you correctly about the value quiz. To add, the Cell Format (Category)is General

Technology does not drive change -- it enables change.
 


What I meant by VALUES is how does it enhance the value of the data to enclose each cell's value in quotes.

For instance, I might add all kinds of pretty colors to my sheet, but might not add anything at all to the value or worth of my sheet. If so, it is a wasted effort, as it adds no value to my workbook.

Skip,
[sub]
[glasses] [red]Be Advised![/red] A man who jumps from a bridge in Paris, is…
INSANE! [tongue][/sub]
 
Skip

I got you. My vendor who requires this format. Part of the file, three columns:

Original file:
Univ New England Lib 006746 024.097.224.002
Univ New England Lib 006746 024.097.224.002


I would like to add quotes:
"Univ New England Lib" "006746" "024.097.224.002"
"Univ New England Lib" "006746" "024.097.224.002"


This is the format (with quotes) needed by the third part (vendor).

Technology does not drive change -- it enables change.
 
You could use something like
="""" & A2 &""""
in another cell to add the quotes around existing text. Then copy 'n' paste special > Values over the original data.

Or, if you're comfortable with VBA, you could use something like
Code:
For each cell in Selection
    cell.value = """" & cell.value & """"
Next cell

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Thanks a lot, the VBA worked fine. I do appreaciate.

Technology does not drive change -- it enables change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top