Hi All,
I am using the below vba code in my excel to insert copied rows, but I want to modify it a bit in order to insert a copied row (of row 5) below it and above the "TOTAL:" bar.
Sub INSERTCOPY()
With ActiveCell.EntireRow
.Copy
.Offset(1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
On Error Resume Next
.Offset(1).SpecialCells(xlCellTypeConstants).Value = ""
Application.CutCopyMode = False
On Error GoTo 0
End With
End Sub
Something like?
For i = 5 To lastrow
If inarr(i, 1) <> "TOTAL:" Then ?
Thanks in advance
I am using the below vba code in my excel to insert copied rows, but I want to modify it a bit in order to insert a copied row (of row 5) below it and above the "TOTAL:" bar.
Sub INSERTCOPY()
With ActiveCell.EntireRow
.Copy
.Offset(1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
On Error Resume Next
.Offset(1).SpecialCells(xlCellTypeConstants).Value = ""
Application.CutCopyMode = False
On Error GoTo 0
End With
End Sub
Something like?
For i = 5 To lastrow
If inarr(i, 1) <> "TOTAL:" Then ?
Thanks in advance