As long as there is a First Last Followed by the Company the following will work:
I didn't see any Names without a Company in the sheet I was working with.
Sub transpose()
Dim i As Long, tRow As Long, newName As String
Cells(1, 4) = "Name"
Cells(1, 5) = "Company"
Cells(1, 6) = "Phone"
Cells(1, 7) = "EMail"
i = 1
tRow = 2
Do Until Cells(i, 1) = ""
Cells(tRow, 4) = Cells(i, 1)
i = i + 1
Cells(tRow, 5) = Cells(i, 1)
i = i + 1
If Left(Cells(i, 1), 3) = "Tel" Then
Cells(tRow, 6) = Cells(i, 1)
i = i + 1
End If
If Left(Cells(i, 1), 5) = "Email" Then
Cells(tRow, 7) = Cells(i, 1)
i = i + 1
End If
tRow = tRow + 1
Loop
End Sub
Bookmarks