Move Address and Phone number to adjacent column

Niven

New Member
Joined
Aug 23, 2011
Messages
45
Hi,I have a spreadsheet of names, addresses and phone numbers in this format (with a blank row between each)

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]John Doe[/TD]
[/TR]
[TR]
[TD]49 Alice Lane, Sandton
[/TD]
[/TR]
[TR]
[TD](011) 4518522[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Paul Hoff[/TD]
[/TR]
[TR]
[TD]78 Jimmy Street, Durban[/TD]
[/TR]
[TR]
[TD](031) 7484152[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Harry Smith[/TD]
[/TR]
[TR]
[TD]748 George Avenue, Cape Town[/TD]
[/TR]
[TR]
[TD](021) 6394187[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I want to move the address to the column next to the name and the phone number in the next column so I can have a database.Any suggestions please.
Thanks.
Niven
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try this with a COPY of your sheet

Code:
Sub Addrs()
Dim Area As Range
For Each Area In Columns("A").SpecialCells(xlCellTypeConstants).Areas
    Area(1).Offset(, 1).Resize(, Area.Rows.Count).Value = Application.Transpose(Area)
Next Area
Columns("A").Delete
Columns("B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
 
Upvote 0
Hi,I have a spreadsheet of names, addresses and phone numbers in this format (with a blank row between each)John Doe49 Alice Lane, Sandton(011) 5554512Mike Smith48 Fredman Drive, Sandton(011) 4781124Paul Hoff745 George Lane, Johannesburg(011) 8964521etc.I want to move the address to the column next to the name and the phone number in the next column so I can have a database.Any suggestions please.Thanks.Niven

the formatting in your post changed
 
Last edited:
Upvote 0
c1=INDIRECT("A"&((ROW()-1)*4)+Column()-2) and drag to d1 and e1

Then drag c1:e1 down till you get 0 as result (then there are no more names in column A).
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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