Sub Test()
Dim LR(1) As Long, i As Long, j As Long
With ActiveSheet
LR(0) = .Cells(Rows.Count, 1).End(xlUp).Row
.Range("Q:Q, L:L").EntireColumn.Delete
For i = LR(0) To 3 Step -1
If UCase(.Cells(i, 1)) = "YES" Then
.Rows(i & ":" & i + 1).Insert
End If
Next i
LR(1) = .Cells(Rows.Count, 1).End(xlUp).Row
For j = 2 To LR(1)
If UCase(.Cells(j, 1)) = "YES" Then
.Cells(j + 1, "I").Value = .Cells(j, "J")
.Cells(j + 2, "I").Value = .Cells(j, "K")
.Cells(j + 1, "M").Value = .Cells(j, "N")
.Cells(j + 2, "M").Value = .Cells(j, "O")
End If
Next j
End With
End Sub
Bookmarks