repairman615
Well-known Member
- Joined
- Dec 21, 2009
- Messages
- 1,885
Hello,
I have some data set up in a table like fashion. (not a table) B7:L17.
I am working on a macro to insert a row at the bottom, format as above, and the fill the formulas down.
the line in red give the problem. If I use range ("b7:b18") it is ok however since i would like to do this dynamic, that would not fill the new last line with the formulas above.
I won't be back till tonight. Thanks to all here.
Any insight is valued.
I have some data set up in a table like fashion. (not a table) B7:L17.
I am working on a macro to insert a row at the bottom, format as above, and the fill the formulas down.
Code:
Sub a()
Range("B" & Rows.Count).End(xlUp).Offset(1, 0).EntireRow.Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.AutoFill Destination:=[COLOR=red]Range(("B" & Range("B" & Rows.Count).End(xlUp).row) & ":L" & Range("B" & Rows.Count).End(xlUp).row + 1)[/COLOR], Type:=xlFillDefault
End Sub
the line in red give the problem. If I use range ("b7:b18") it is ok however since i would like to do this dynamic, that would not fill the new last line with the formulas above.
I won't be back till tonight. Thanks to all here.
Any insight is valued.