I have the following macro
Sub Insert()
With ActiveCell.EntireRow
.Insert
.Cells(1, 15).Copy .Cells(0, 15)
.Cells(1, 19).Copy .Cells(0, 19)
.Cells(1, 20).Copy .Cells(0, 20)
.Cells(1, 21).Copy .Cells(0, 21)
.Cells(1, 22).Copy .Cells(0, 22)
.Cells(1, 23).Copy .Cells(0, 23)
.Cells(1, 24).Copy .Cells(0, 24)
.Cells(1, 27).Copy .Cells(0, 27)
.Cells(1, 28).Copy .Cells(0, 28)
.Cells(1, 29).Copy .Cells(0, 29)
.Cells(1, 31).Copy .Cells(0, 31)
.Cells(1, 32).Copy .Cells(0, 32)
.Cells(1, 33).Copy .Cells(0, 33)
.Cells(1, 34).Copy .Cells(0, 34)
.Cells(1, 35).Copy .Cells(0, 35)
.Cells(1, 36).Copy .Cells(0, 36)
End With
End Sub
The macro allows a past function to insert a line in to a table along with any formula.
The macro works fine until.
.Cells(1, 31).Copy .Cells(0, 31)
.Cells(1, 32).Copy .Cells(0, 32)
.Cells(1, 33).Copy .Cells(0, 33)
.Cells(1, 34).Copy .Cells(0, 34)
.Cells(1, 35).Copy .Cells(0, 35)
.Cells(1, 36).Copy .Cells(0, 36)
when from cell 31 onwards no formula are pasted in to the new row.
Any ideas??
Sub Insert()
With ActiveCell.EntireRow
.Insert
.Cells(1, 15).Copy .Cells(0, 15)
.Cells(1, 19).Copy .Cells(0, 19)
.Cells(1, 20).Copy .Cells(0, 20)
.Cells(1, 21).Copy .Cells(0, 21)
.Cells(1, 22).Copy .Cells(0, 22)
.Cells(1, 23).Copy .Cells(0, 23)
.Cells(1, 24).Copy .Cells(0, 24)
.Cells(1, 27).Copy .Cells(0, 27)
.Cells(1, 28).Copy .Cells(0, 28)
.Cells(1, 29).Copy .Cells(0, 29)
.Cells(1, 31).Copy .Cells(0, 31)
.Cells(1, 32).Copy .Cells(0, 32)
.Cells(1, 33).Copy .Cells(0, 33)
.Cells(1, 34).Copy .Cells(0, 34)
.Cells(1, 35).Copy .Cells(0, 35)
.Cells(1, 36).Copy .Cells(0, 36)
End With
End Sub
The macro allows a past function to insert a line in to a table along with any formula.
The macro works fine until.
.Cells(1, 31).Copy .Cells(0, 31)
.Cells(1, 32).Copy .Cells(0, 32)
.Cells(1, 33).Copy .Cells(0, 33)
.Cells(1, 34).Copy .Cells(0, 34)
.Cells(1, 35).Copy .Cells(0, 35)
.Cells(1, 36).Copy .Cells(0, 36)
when from cell 31 onwards no formula are pasted in to the new row.
Any ideas??