Hi,
I misread your post a bit. I was under the impression that the names were in separate columns. I think they are complete and in column A. You do *not* need to manipulate the original data in any way then.
Below the instructions are the modified code. Let me know if this works for you.
1. Make sure your data is on the active sheet.
2. Make sure the active sheet is not Sheet2
3. Copy the code below
4. Go back to Excel and hold down the Alt key while depressing the F11 key on the top row. (Alt-F11). You will now be in the Visual Basic Editor (VBE)
5. From the top menu Insert>Module
6. Paste the code you copied.
7. Type Alt-Q to exit the VBE and return to Excel proper.
8. Run the program, by doing either:
a) Tools>Macro>Macros choose test and hit OK
b) Alt+F8 and choose test, OK.
'---begin VBA---
Sub test()
Dim counter As Long, lastrow As Long, x As Long
Dim matchrow As Long, lastcol As Integer
With ActiveSheet
.UsedRange
lastrow = .Cells.SpecialCells(xlCellTypeLastCell).Row
.Columns("G:G").Clear
.Columns("A:A").AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=Range("G1"), Unique:=True
.Range("G1").Delete shift:=xlUp
counter = WorksheetFunction.CountA(.Range("G:G"))
.Range("G1:G" & counter).Copy Sheets("sheet2").Range("A1")
.Range("G1:G" & counter).ClearContents
For x = 2 To lastrow
matchrow = Application.Match(.Cells(x, 1), Sheets("Sheet2").Range("A:A"), 0)
lastcol = Sheets("Sheet2").Cells(matchrow, 256).End(xlToLeft).Column
.Range(.Cells(x, 2), .Cells(x, 5)).Copy Sheets("Sheet2").Cells(matchrow, lastcol + 1)
Next x
End With
MsgBox "Done!"
End Sub
'---end VBA---
Please post back if you have any troubles.
Bye,
Jay