Insert row macro

  • Thread starter Thread starter Janette
  • Start date Start date
J

Janette

I am so new to this macro thing, so please when you respond, make is simple :)
I would like to have a macro to insert eight rows relative to where my
cursor is. The entire macro I was trying to create was to insert eight rows
and autofill the contents that sit below the new eight rows that are created.
My macro works, but only in the cell I created it for - not relative to
where I need it. I know there must be some special code to get this to work.
Thanks in advance - I love this site.
 
Sub EightMoreRows()
ActiveCell.Offset(1, 0).Resize(8, 1).EntireRow.Insert shift:=xlDown
End Sub
'-
Helpful posting advice here... http://www.cpearson.com/excel/newposte.htm
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins - free trial for "Rows to Repeat at Bottom")




"Janette"
wrote in message
I am so new to this macro thing, so please when you respond, make is simple :)
I would like to have a macro to insert eight rows relative to where my
cursor is. The entire macro I was trying to create was to insert eight rows
and autofill the contents that sit below the new eight rows that are created.
My macro works, but only in the cell I created it for - not relative to
where I need it. I know there must be some special code to get this to work.
Thanks in advance - I love this site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top