Option Explicit
Sub ProcessData()
Dim iLastrow As Long
Dim i As Long
Application.ScreenUpdating = False
With ActiveSheet
iLastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = iLastrow To 2 Step -1
.Rows(i + 1).Resize(3).Insert
.Cells(i + 1, "A").Value = .Cells(i, "D").Value
.Cells(i + 1, "B").Value = .Cells(i, "A").Value
.Cells(i + 1, "C").Value = .Cells(i, "B").Value
.Cells(i + 1, "D").Value = .Cells(i, "C").Value
.Cells(i + 2, "A").Value = .Cells(i, "E").Value
.Cells(i + 2, "B").Value = .Cells(i, "A").Value
.Cells(i + 2, "C").Value = .Cells(i, "B").Value
.Cells(i + 2, "D").Value = .Cells(i, "C").Value
.Cells(i + 3, "A").Value = .Cells(i, "F").Value
.Cells(i + 3, "B").Value = .Cells(i, "A").Value
.Cells(i + 3, "C").Value = .Cells(i, "B").Value
.Cells(i + 3, "D").Value = .Cells(i, "C").Value
.Cells(i, "A").Insert Shift:=xlToRight
.Cells(i, "A").Value = .Cells(i, "E").Value
.Cells(i, "E").Resize(, 4).ClearContents
Next i
End With
End Sub
> I need to manipulate an excel file that contains relay results from a summer
> swim leauge. I need to take a row that looks like this:
[quoted text clipped - 56 lines]
> Range("A10").Select
> End Sub
a - 07 Jul 2007 19:20 GMT
Thanks.
> Option Explicit
>
[quoted text clipped - 91 lines]
>> Range("A10").Select
>> End Sub
Dana DeLouis - 08 Jul 2007 19:59 GMT
Here's my technique on doing something similar:
Sub Demo()
Dim D As Variant
Dim R As Long '(R)ow
Dim C As Long '(C)olumn
Dim M As Variant
Dim Rec As Long
Set D = CreateObject("Scripting.Dictionary")
M = [A1].CurrentRegion.Value
For R = 2 To UBound(M, 1)
For C = 4 To 7
Rec = Rec + 1
D.Add Rec, Array(M(R, C), M(R, 1), M(R, 2), M(R, 3))
Next C
Next R
[A1].CurrentRegion.Clear
[A2].Resize(D.Count, 4) = T2(D.items)
With [A1:D1]
.Value = Array("Swimmer", "Team", "Date", "Meet")
.EntireColumn.AutoFit
End With
End Sub
' T2 is one of my common Library Functions:
Private Function T2(v)
' Transpose twice.
With WorksheetFunction
T2 = .Transpose(.Transpose(v))
End With
End Function

Signature
HTH :>)
Dana DeLouis
Windows XP & Excel 2007
> Thanks.
>
[quoted text clipped - 93 lines]
>>> Range("A10").Select
>>> End Sub