Algo como isso deve funcionar, supondo que esses dados iniciem na célula A1
Na verdade - aqui, eles ficarão em ordem
Sub test()
Dim lastrow As Integer
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Dim howmany As Integer
For i = lastrow To 1 Step -1
If Cells(i, 4) > 1 Then
howmany = Cells(i, 4)
For j = 1 To howmany - 1
Rows(i + 1).Insert (xlShiftDown)
Cells(i, 4) = 1
Cells(i + 1, 1) = Cells(i, 1)
Cells(i + 1, 2) = Cells(i, 2)
Cells(i + 1, 3) = Cells(i, 3)
Cells(i + 1, 4) = Cells(i, 4)
Cells(i + 1, 5) = Cells(i, 5)
Next
End If
Next
End Sub
Este coloca-os no final:
Sub test()
Dim lastrow As Integer
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Dim nextrow As Integer
nextrow = lastrow + 1
Dim howmany As Integer
For i = 1 To lastrow
If Cells(i, 4) > 1 Then
howmany = Cells(i, 4)
For j = 1 To howmany - 1
Cells(i, 4) = 1
Cells(nextrow, 1) = Cells(i, 1)
Cells(nextrow, 2) = Cells(i, 2)
Cells(nextrow, 3) = Cells(i, 3)
Cells(nextrow, 4) = Cells(i, 4)
Cells(nextrow, 5) = Cells(i, 5)
nextrow = nextrow + 1
Next
End If
Next
End Sub