Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
can someone help? i need to export a list to a word-
wrapped with commas text document My spreadsheet has 500 such numbers: Column A 4567 45676 23434 442344 desired outpu: 4567,45676,23434,442344 Thanks |
#2
![]() |
|||
|
|||
![]()
Hi, Jose!
Try this - you'll need to select the cells in your worksheet first, and obviously subsitute an appropriate path and filename in the save as line Hope this helps Pete Sub ListToTest() Dim ListCounter As Integer Dim ConCatString As String ConCatString = "" For ListCounter = 1 To Selection.Cells.Count ConCatString = ConCatString & CStr(Selection.Cells(ListCounter)) & "," Next ListCounter Workbooks.Add Range("A1").Formula = ConCatString ActiveWorkbook.SaveAs Filename:="D:\Pete's Operations\VBA\Example.csv", _ FileFormat:=xlCSV, CreateBackup:=False ActiveWorkbook.Close End Sub "jose vargas" wrote: can someone help? i need to export a list to a word- wrapped with commas text document My spreadsheet has 500 such numbers: Column A 4567 45676 23434 442344 desired outpu: 4567,45676,23434,442344 Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Going from column to comma separated list... | Excel Discussion (Misc queries) | |||
how can I list items in a column with totals? | Excel Discussion (Misc queries) | |||
Insert column entries from a master list | Excel Worksheet Functions | |||
Insert column entries from a master list | Excel Worksheet Functions | |||
Insert column entries from a master list | Excel Worksheet Functions |