Convert address list

Billmania

New Member
Joined
May 11, 2002
Messages
3
I have a list of addresses that runs in a column like a normal postal address (5 rows). I'm trying to convert it to one address to a row instead of forty or fifty in one column. When I use the transpose it puts the entire column on on row. How can I get it to copy the addresses and put each address on a seperate row?

Thanks for your help,
Bill
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Okay, it may not work exactly, but you should get the idea. Suppose you have 5 lines per address, and one line in between (and no headings):

B1: =A1
C1: =A2
D1: =A3
E1: =A4
F1: =A5

B7: =A7
C7: =A8
D7: =A9
E7: =A10
F7: =A11

Now, select cells B1 through F12.
Grab the fill handle and copy down as far as you need.
Don't let go of the selected area.
Hit Copy.
Hit Edit-Paste special, Values.
Delete column A.
Select the new column A.
Hit Edit-Go to-Special, Blanks.
Hit Edit-Delete, choose Entire row.

Hope that helps!

_________________
TheWordExpert
This message was edited by Dreamboat on 2002-05-12 13:14
 
Upvote 0
This is a great technique. Only one correction, Dreamboat. You wrote:
"Now, select cells B1 through B12.
Grab the fill handle and copy down as far as you need. "
I tried it, and discovered it should read "B1 through F12." (Thank the stars for the Undo button...)
 
Upvote 0
Here's a VB solution that will loop until a blank row is encountered.
Code:
Sub TransAddr()
' Transpose Addr until blank row is found
    Do
    RowCnt = RowCnt + 1
        For ColCnt = 1 To 5
            Cells(RowCnt, ColCnt).Value = Cells(RowCnt + ColCnt - 1, 1).Value
            If ColCnt = 5 Then Rows(RowCnt + 1 & ":" & RowCnt + 4).Delete Shift:=xlUp
        Next
    Loop Until Len(Trim(Cells(RowCnt, 1).Value)) = 0
End Sub
 
Upvote 0
Okay, thanks!! I made that correction to make it easier for people NOT to make the same mistake.

:)
 
Upvote 0
Maybe I need to explain again. Here goes; All the addresses are in column A.

A1 Company
A2 Street address
A3 City
A4 Phone
A5 Blank row

What I'm looking for is this.

A1 Company
B1 Street Address
C1 City
D1 Phone

The transpose command does what I want but I have fifty or so Addresses. If I take the column and transpose it all then it puts it all on row 1. How can I do this with out haveing to select each address and tranpose it one at a time?
 
Upvote 0
On 2002-05-13 06:54, Billmania wrote:
Maybe I need to explain again. Here goes; All the addresses are in column A.

A1 Company
A2 Street address
A3 City
A4 Phone
A5 Blank row

What I'm looking for is this.

A1 Company
B1 Street Address
C1 City
D1 Phone

The transpose command does what I want but I have fifty or so Addresses. If I take the column and transpose it all then it puts it all on row 1. How can I do this with out haveing to select each address and tranpose it one at a time?

Hi Billmania:
Following is one of the ways you can use the Transpose function for your situation.

In cell C1, put the following formula
=(("A"&(ROW()-1)*5+1&":A"&(ROW()*5-1)))
and copy this down from c2:c50 to take care of all of your 50 records.

Then in cell D1 write the following formula:
=Transpose(indirect(C1)) -- this is an array formula, clcick on cell D1, highlite cells D1:G1 and array enter the formula in cell D1
this will transpose the entries in A1:A4 to D1:G1
Now copy the formula in cell D1 to D2:D50 and all your 50 records will be now 1-liners in columns D through G.

Please post back if it works for you .. otherwise explain a little further and let us take it from there.

Regards!
 
Upvote 0
You can also do it by without using the Traspose function by writing the following formulas:

in cell D1 ... '=INDIRECT("A"&(ROW()-1)*5+1)
in cell E1 ... '=INDIRECT("A"&(ROW()-1)*5+2)
in cell F1 ... '=INDIRECT("A"&(ROW()-1)*5+3)
in cell G1 ... '=INDIRECT("A"&(ROW()-1)*5+4)

Then copy the formulas in cells D1:G1 to D2:D50 and you will have all of your fifty records from column A as 1-liners in cells D1:G50
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,636
Members
449,043
Latest member
farhansadik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top