Hello everyone,
I've searched the forums for a suitable answer to this problem but so far with no success.
Can anyone help me with some vba that might make this job nice and easy?
Huge appreciation in advance,
mr_pepps
(Newbie)
P.S.
I did find this online, but it only iserts new text every other row, not every nth row. Could this be modified?
Sub inserttexteveryonerow()
Dim Last As Integer
Dim emptyRow As Integer
Last = Range("A" & Rows.Count).End(xlUp).Row
For emptyRow = Last To 2 Step -1
If Not Cells(emptyRow, 2).Value = "" Then
Rows(emptyRow).Resize(1).Insert
Range(Cells(emptyRow, "D"), Cells(emptyRow, "F")).Value = Array("0050", "FTPm6binder", "M6 x 10mm M/S flanged stud")
End If
Next emptyRow
End Sub
I've searched the forums for a suitable answer to this problem but so far with no success.
- I have a small worksheet with only 1701 rows of data.
- I need to insert a new row every 5th row.
- In that new row I need to populate 3 cells (D, E and F) with the same data each time, all the way down through the worksheet.
Can anyone help me with some vba that might make this job nice and easy?
Huge appreciation in advance,
mr_pepps
(Newbie)
P.S.
I did find this online, but it only iserts new text every other row, not every nth row. Could this be modified?
Sub inserttexteveryonerow()
Dim Last As Integer
Dim emptyRow As Integer
Last = Range("A" & Rows.Count).End(xlUp).Row
For emptyRow = Last To 2 Step -1
If Not Cells(emptyRow, 2).Value = "" Then
Rows(emptyRow).Resize(1).Insert
Range(Cells(emptyRow, "D"), Cells(emptyRow, "F")).Value = Array("0050", "FTPm6binder", "M6 x 10mm M/S flanged stud")
End If
Next emptyRow
End Sub