I initially posted this in the Excel forum and got several suggestions. However, a programmer who responded provided one possible solution (below) but also suggested that I “Post it in the Office VBA forum. What I [he] posted here could be done in VBA but would require a bit more detail.”
I thot perhaps this was something that others regularly encountered and that there might be a more or less "standard" solution. Clearly that is not the case.
The person who created the list typed them one-by-one into a Word label template from a handwritten list. I sure don't want to have to cut/paste everything for 1,000 records..
ORIGINAL POST:
Here are examples of 3 and 4 line addresses in a Word file of labels that I have imported into Excel. Now, I need to convert the 3 and 4 line addresses to columns in Excel; e.g., col headings like:
Salutation/Company/Street/City/State/Zip (some with 5 digit Zip, some with Zip+4).
There is one blank row between each address.
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke, VA 22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne, VA 22192-4333
Can anyone provide something that can do this conversion? Thanks!
A PROGRAMMER’S RESPONSE (with suggestion that I also post in Office VBA forum)
How long is the list? [about 1,000 addresses] It seems that it would be easier to get the formatting right in the Word document first. As a variation on the Find/Replace:
1) Go to edit -> Replace
2) In the “Find What:” box type in a comma followed by a space.
3) Put your cursor in the “Replace With” box and press the “special” button.
4) Select “Manual Line Break”.
Cycle through all the commas and replace the commas with line breaks so that you get this.
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke
VA
22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne
VA
22192-4333
Go through all the addresses and add a blank line so that they all have the same number of rows:
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke
VA
22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne
VA
22192-4333
Copy and paste all the addresses into Excel starting a A2. Put your lables, Salutation/Company/Street/City/State/Zip, in cells B1 to G1. Select B2 to G2 and type in the formula:
=Transpose(A2:A7)
DO NOT HIT ENTER, press ctrl + Shift + enter to create an array formula. The equation should look like this:
{=Transpose(A2:A7)}
Select cells B2 to G2 and copy. Paste the formula in the same row that the 'Salutation' is in for each record.
Last, copy all the cells in columns B threw G and paste special 'Values' into a different sheet. To eliminate all the spaces do a sort (Data --> Sort).
I thot perhaps this was something that others regularly encountered and that there might be a more or less "standard" solution. Clearly that is not the case.
The person who created the list typed them one-by-one into a Word label template from a handwritten list. I sure don't want to have to cut/paste everything for 1,000 records..
ORIGINAL POST:
Here are examples of 3 and 4 line addresses in a Word file of labels that I have imported into Excel. Now, I need to convert the 3 and 4 line addresses to columns in Excel; e.g., col headings like:
Salutation/Company/Street/City/State/Zip (some with 5 digit Zip, some with Zip+4).
There is one blank row between each address.
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke, VA 22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne, VA 22192-4333
Can anyone provide something that can do this conversion? Thanks!
A PROGRAMMER’S RESPONSE (with suggestion that I also post in Office VBA forum)
How long is the list? [about 1,000 addresses] It seems that it would be easier to get the formatting right in the Word document first. As a variation on the Find/Replace:
1) Go to edit -> Replace
2) In the “Find What:” box type in a comma followed by a space.
3) Put your cursor in the “Replace With” box and press the “special” button.
4) Select “Manual Line Break”.
Cycle through all the commas and replace the commas with line breaks so that you get this.
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke
VA
22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne
VA
22192-4333
Go through all the addresses and add a blank line so that they all have the same number of rows:
Jane, Kathy, & Gladys
Burke Blinds
4924 Lyngate Ct.
Burke
VA
22015
Mr. & Mrs. Harley Dorffman
3388 Chesma Drive
Woodbyne
VA
22192-4333
Copy and paste all the addresses into Excel starting a A2. Put your lables, Salutation/Company/Street/City/State/Zip, in cells B1 to G1. Select B2 to G2 and type in the formula:
=Transpose(A2:A7)
DO NOT HIT ENTER, press ctrl + Shift + enter to create an array formula. The equation should look like this:
{=Transpose(A2:A7)}
Select cells B2 to G2 and copy. Paste the formula in the same row that the 'Salutation' is in for each record.
Last, copy all the cells in columns B threw G and paste special 'Values' into a different sheet. To eliminate all the spaces do a sort (Data --> Sort).