D
DataFreakFromUtah
No question here, just a procedure for the archive.
Search criteria:
Insert a new row every other row. Insert a row every second row
Add new row after every other row. Every 2nd row inserter. Insert
alternating
rows. Insert alternate rows.
Sub InsertNewRowsEveryOtherRow()
Dim ValueInput As Integer
On Error Resume Next
ValueInput = InputBox("Enter # of alternating rows you would like
to insert.", "Insert Alternating Rows")
If ValueInput = False Then
Exit Sub
End If
If ValueInput > 0 Then
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Insert
' 'Option to color newly inserted row here:
' With Selection.EntireRow.Interior
' .ColorIndex = 15
' End With
Do Until myvar = ValueInput - 1
ActiveCell.Offset(2, 0).Select
Selection.EntireRow.Insert
'Option to color newly inserted row here:
' With Selection.EntireRow.Interior
' .ColorIndex = 15
' End With
myvar = myvar + 1
Loop
End If
End Sub
Search criteria:
Insert a new row every other row. Insert a row every second row
Add new row after every other row. Every 2nd row inserter. Insert
alternating
rows. Insert alternate rows.
Sub InsertNewRowsEveryOtherRow()
Dim ValueInput As Integer
On Error Resume Next
ValueInput = InputBox("Enter # of alternating rows you would like
to insert.", "Insert Alternating Rows")
If ValueInput = False Then
Exit Sub
End If
If ValueInput > 0 Then
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Insert
' 'Option to color newly inserted row here:
' With Selection.EntireRow.Interior
' .ColorIndex = 15
' End With
Do Until myvar = ValueInput - 1
ActiveCell.Offset(2, 0).Select
Selection.EntireRow.Insert
'Option to color newly inserted row here:
' With Selection.EntireRow.Interior
' .ColorIndex = 15
' End With
myvar = myvar + 1
Loop
End If
End Sub