Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel comma quote

Is there a way to select a column of ID numbers in an Excel (2002)
column and save it to a text file or clipboard with comma quote
delimiters?

0000031814
0000044857
0000015098
0000043186
0000111012
0000017184

becomes

"0000031814","0000044857","0000015098",
"0000043186","0000111012","0000017184"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default excel comma quote

Hi,
One suggestion will be to do Edit/Copy and then Edit/PasteSpecial/Transpose.
This will help you transform the column of cells to a row of cells. Then
delete the column of cells and export to a CSV format. (This option is
available when you save the file by using Save As on an existing file.)
Unfortunately this will still not enclose the numbers in double quotes.
Alok

" wrote:

Is there a way to select a column of ID numbers in an Excel (2002)
column and save it to a text file or clipboard with comma quote
delimiters?

0000031814
0000044857
0000015098
0000043186
0000111012
0000017184

becomes

"0000031814","0000044857","0000015098",
"0000043186","0000111012","0000017184"


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default excel comma quote

Does this get you started:

Sub Test()
Dim i As Integer
Dim strList As String

For i = 1 To Range("MyRange").Count
strList = strList & """" & Range("MyRange")(i).Text & """, "

Next i
strList = Left(strList, Len(strList) - 2)
MsgBox strList
End Sub

I tested this on your short list and it produced the correct string.
However there may be a limit to the length of the string (max number of
characters)
Don't know if this will work for you.

" wrote:

Is there a way to select a column of ID numbers in an Excel (2002)
column and save it to a text file or clipboard with comma quote
delimiters?

0000031814
0000044857
0000015098
0000043186
0000111012
0000017184

becomes

"0000031814","0000044857","0000015098",
"0000043186","0000111012","0000017184"


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CANNOT Import comma delimted, quote qualifed text file into Excel. Feiming Chen Excel Discussion (Misc queries) 2 August 28th 09 11:41 PM
adding a single quote and comma to every cell in Excel rodsheffield Excel Programming 3 October 4th 05 08:17 PM
how do I create comma and double quote delimited file mikeb Excel Discussion (Misc queries) 1 November 29th 04 10:01 PM
Excel How do I create a comma delineated xls file to a comma delineated. Mark Excel Discussion (Misc queries) 0 November 26th 04 10:28 PM
Typing a quote character Vs pasting a quote character= whathappens to the resulting CSV? Interesting!! Jon Peltier[_3_] Excel Programming 0 August 3rd 03 02:22 AM


All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"