Hi All,

I have used the following VBA code in my workbook to insert a defined number of rows and copy the formulas from the selected row to insert above, however, I have a series of hidden columns which the copy formula is not being applied to....does anyone have any suggestions as to how I can get around this?

Sub InsertRow()
Dim Rng, n As Long, k As Long
Application.ScreenUpdating = False
Rng = InputBox("Enter number of rows required.")
If Rng = "" Then Exit Sub
Range(ActiveCell, ActiveCell.Offset(Val(Rng) - 1, 0)).EntireRow.Insert
k = ActiveCell.Offset(-1, 0).Row
n = Cells(k, 256).End(xlToLeft).Column
Range(Cells(k, 1), Cells(k + Val(Rng), n)).FillDown
End Sub