Another option is to just use the entirerow:
Range("B26:G26").Resize(Range("b25").Value).Insert
becomes
Range("B26:G26").Resize(Range("b25").Value).entire row.Insert
Or
Range("B26").Resize(Range("b25").Value).entirerow. Insert
(since B26:G26 is just one row)
Since you're using the entirerow, there's only one way you can shift it--down.
zero635 wrote:
Ok, I am using the following code to insert rows below a header.
Sub InsertRange()
Range("B26:G26").Resize(Range("b25").Value).Insert
End Sub
Well, with a value of 8 or greater in cell "B25", my data below it
shifts to the right.
With a value of 7 or less it shifts the data below down and gives me
the empty spaces I need.
Can anyone tell me why a value of 8 or greater would cause this formula
to shift my data to the right, instead of down like a normal insertion?
Thank You,
Chris
--
zero635
------------------------------------------------------------------------
zero635's Profile: http://www.excelforum.com/member.php...o&userid=24802
View this thread: http://www.excelforum.com/showthread...hreadid=388048
--
Dave Peterson