I found this code online and have been trying to modify it to fit what I need it to do. The only thing is with this current code is that it creates one new row below and one new above the row that this code applies to. I want both new rows to be created above the row.
VBA Code:
Sub new_rows()
For i = 2 To 1000
size1 = Cells(i, 2).Value
size2 = Cells(i, 3).Value
If size 1 <> "" And size 1 <> 0 Then
Cells(i, 1).Offset(0, 0).EntireRow.Insert
Cells(i, 2) = size1
i = i + 2
End If
If size 2 <> "" And size 2 <> 0 Then
Cells(i, 1).Offset(0, 0).EntireRow.Insert
Cells(i, 2) = size2
i = i + 2
End If
Next
End Sub