Hi Bob
I don't think that quite achieves what the OP was looking for.
If I understand her requirement correctly, then maybe this will do it
Sub sortData()
Dim i As Long, j As Long, k As Long, lr As Long, lc As Long
Dim wss As Worksheet, wsd As Worksheet
Application.ScreenUpdating = False
Set wss = ThisWorkbook.Sheets("Sheet1") ' Source
Set wsd = ThisWorkbook.Sheets("Sheet2") 'Destination
lr = wss.Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr
j = wss.Cells(i, 1).Value
k = Asc(wss.Cells(i, 2).Value) - 95
wsd.Cells(j + 1, 1) = j
wsd.Cells(j + 1, k) = wss.Cells(i, 3).Value
Next i
lc = wsd.Cells.Find("*", [A1], , , xlByColumns, xlPrevious).Column
For i = 2 To lc
wsd.Cells(1, i) = Chr(i + 95)
Next i
Application.ScreenUpdating = False
End Sub
Shirley, in order to use the proposed solution
Copy the Code above
Alt+F11 to invoke the VB Editor
Insert>Module
Paste code into white pane that appears
Alt+F11 to return to Excel
To use
Select sheet containing the PT's
Alt+F8 to bring up Macros
Highlight the macro name
Run
--
Regards
Roger Govier
Bob Phillips said:
Public Sub ProcessData()
Dim i As Long
Dim LastRow As Long
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1
If .Cells(i, "A").Value = .Cells(i - 1, "A").Value Then
.Cells(i, "C").Resize(, 100).Copy .Cells(i - 1, "D")
.Rows(i).Delete
End If
Next i
.Columns(2).Delete
End With
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
--
__________________________________
HTH
Bob