
Originally Posted by
surpass
Correction. It worked for all participants except the last one. I think I will take care of that manually! Thanks again for your help, alphafrog

You're welcome.
This does the last one.
Sub Insert_Rows()
Dim rngUniques As Range, cell As Range
Application.ScreenUpdating = False
Range("A1", Range("A" & Rows.Count).End(xlUp)).AdvancedFilter xlFilterInPlace, Unique:=True
Set rngUniques = Range("A2", Range("A" & Rows.Count).End(xlUp)).SpecialCells(xlCellTypeVisible)
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
For Each cell In rngUniques 'Loop through unique Participants
If cell.Row > 2 Then
cell.Resize(4).EntireRow.Insert xlShiftDown 'Insert 4 rows
cell.Offset(-4, 0).Resize(4, 1).Value = cell.Offset(-5, 0).Value 'Copy column A (Participant) values
cell.Offset(-4, 2).Resize(4, 4).Value = cell.Offset(-5, 2).Resize(1, 4).Value 'Copy columns C:F (Vars) values
End If
Next cell
With Range("A" & Rows.Count).End(xlUp)
.Offset(1, 0).Resize(4, 1).Value = .Value
.Offset(1, 2).Resize(4, 4).Value = .Offset(0, 2).Resize(1, 4).Value
End With
Application.ScreenUpdating = True
End Sub
Bookmarks