May 13, 2014
I receive a report that is generated by another program. One column contains the address, city, state, and zip (5 and 10 digit) with no coma separators. Macro that would add comas before the Zip, state, and city so that I can use the text to columns tool in excel.
here is an example of the column
7935 COUNCIL PL SUITE 200 MATTHEWS NC 28105
223 WRENWOOD LN CHARLOTTE NC 28211
1125 BIRCH ST APT A ROGERS CITY MI 49779-1406
PO BOX 1376 NEW YORK NY 10018
428 C ST APT 301 SAN DIEGO CA 92101
4682 MISSION BV SAN DIEGO CA 92109
I need it to look like this:
7935 COUNCIL PL SUITE 200 ,MATTHEWS ,NC ,28105
223 WRENWOOD LN ,CHARLOTTE ,NC ,28211
1125 BIRCH ST APT A ,ROGERS CITY ,MI ,49779-1406
PO BOX 1376 ,NEW YORK ,NY ,10018
428 C ST APT 301 ,SAN DIEGO ,CA ,92101
4682 MISSION BV ,SAN DIEGO ,CA ,92109
Then I can run the text to columns and it will split the text into 4 columns.
View 7 Replies
View Related
Nov 10, 2006
I would like to export some data from excel to a text file. An example of text in excel is as below. which each number is in a separate cell.
1
12
123
1234
I tried to exported it as csv format and open it with text editor. it become
1,,,
1,2,,
1,2,3,
1,2,3,4
,,,,
,,,,
,,,,
however I would like the text file looks like this with a space between each comma.
1
1, 2
1, 2, 3
1, 2, 3, 4
What the best way to do it?
View 2 Replies
View Related
Nov 30, 2007
I have a spreadsheet that is produced by a macro. This spreadsheet has a table of 30 rows and 24 columns pasted into it from another spreadsheet. The first 6 rows of vary between containing 1 and 6 columns of data. The next 17 rows always have 24 columns of data. The last row has 1 column of data. The macro saves this spreadsheet as a .csv file. The macro works great, but when I open the .csv file in notepad all the rows have 23 commas, even for the rows with only a few columns of data. Here is a shorten example of the file when opened in Notepad....
<GTS-IPL-Customer>,,,,,,,,,,,,,,,,,,,,,,,,
H1,October,2007,,,Normal,,,,,,,,,,,,,,,,,,,
H2,000426,,,,,,,,,,,,,,,,,,,,,,,
H3,2.72283E+12,,,,,,,,,,,,,,,,,,,,,,,
H4,88100031,,,,,,,,,,,,,,,,,,,,,,,
H5,NBPL,,,,,,,,,,,,,,,,,,,,,,,
D,10012007,0,312,2,310,304,1006,306,306,4,4,31,4,0,0,0,,,,,,,5.805,-23.22
D,10022007,0,334,2,332,330,1009,333,639,-1,3,33,1,0,0,0,,,,,,,6.165,6.165
D,10032007,0,316,2,314,302,1045,316,955,-2,1,31,2,0,0,0,,,,,,,6.675,13.35
Is there anyway to have the macro not insert the commas in the first 6 rows for columns on the right side of the last column of data? I need the data to be formatted in the format shown below.
<GTS-IPL-Customer>
H1,October,2007,,,Normal
H2,000426
H3,2.72283E.....................
View 9 Replies
View Related