B
baconcow
I am trying to do the equivalent of this code, but variable:
Rows("546:546").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
(as provided by a Macro)
However, I do not want to insert the row, everytime, at row 546. I want this
number to be variable... equal to the row at
Range(cell_range.Offset(cell_count + 2))
This range would correspond to "$A$546" at the default cell_count. However,
this number, cell_count, will change and I want the row to always be in the
correct location.
So, I figured I could modify the macro code slightly, and used this:
Rows(cell_range.Offset(cell_count + 2, 0)).Insert _
Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
However, it did not work. I figure it is because I am saying:
Rows("$A$546").Insert
How do I use variables to create something equivalent to Rows("546:546")?
Thanks
Rows("546:546").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
(as provided by a Macro)
However, I do not want to insert the row, everytime, at row 546. I want this
number to be variable... equal to the row at
Range(cell_range.Offset(cell_count + 2))
This range would correspond to "$A$546" at the default cell_count. However,
this number, cell_count, will change and I want the row to always be in the
correct location.
So, I figured I could modify the macro code slightly, and used this:
Rows(cell_range.Offset(cell_count + 2, 0)).Insert _
Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
However, it did not work. I figure it is because I am saying:
Rows("$A$546").Insert
How do I use variables to create something equivalent to Rows("546:546")?
Thanks