Excell macros(need help)
Hi Robert
It is still not entirely clear what you are wanting but it looks like
you have all your data in one column with 3 rows per contact and you
want to move each contact onto its own row. I am going to assume there
are no blank rows inbetween and that you data is consistent in the
number of rows per contact. Also assumed that data in column A with a
heading in row 1. SAVE before trying this:
Sub mvdata()
Dim eRow As Long
Dim i As Long
eRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To eRow - 2
Cells(i, 2).Value = Cells(i + 1, 1).Value
Cells(i, 3).Value = Cells(i + 2, 1).Value
Rows(i + 1).EntireRow.Delete
Rows(i + 1).EntireRow.Delete
Next i
End Sub
Hope this helps
Rowan
R.Shope wrote:
From this:
John Smith
650 West Avenue
phoenix , AZ 33839
To look like this: John Smith 650 West Avenue phoenix , AZ 33839
|