Moving data to new columns

siesawhawk

New Member
Joined
Jun 11, 2009
Messages
3
I have one column with repeating name, address, city/state/zip, and phone number for locations, each in it's own row. For example, A1 is name 1, A2 is address 1, A3 is City/state/zip 1, and A4 is phone 1. Then A5 is name 2, A6 is address 2, etc. This repeats down column 1 for several hundred times. I want to end up with a column for Name, a column for address, a column for city/state/zip, and a column for phone.

I know this should be easy, but I'm a dummy. Thanks for any help!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hello and welcome to MrExcel.

Are there always 4 rows per entry or is there anything that indicates when an entry starts?
 
Upvote 0
Try this. Press ALT + F11 to open the Visual Basic Editor, Insert > Module and paste the following into the white space on the right:

Code:
Sub Xpose()
Dim LR As Long, i As Long, j As Long
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = ActiveSheet
Set ws2 = Worksheets.Add
With ws1
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR Step 4
        j = j + 1
        .Range("A" & i).Resize(4).Copy
        ws2.Range("A" & j).PasteSpecial Paste:=xlPasteValues, Transpose:=True
    Next i
End With
End Sub

Press ALT + Q to return to your sheet, Tools > Macro > Macros, click on Xpose then click the Run button.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

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