Sub xx()
Dim i, j, m, k
m = 3
For i = 3 To Range("a65535").End(xlUp).Row
j = Cells(i, "e")
If j > 1 Then
For k = 1 To j
Range("g" & m & ":j" & m).Value = Range("a" & i & ":d" & i).Value
Range("k" & m) = 1
m = m + 1
Next
Else
Range("g" & m & ":j" & m).Value = Range("a" & i & ":d" & i).Value
Range("k" & m) = 1
m = m + 1
End If
Next
End Sub