Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Insert row macro

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.
--
Janette
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Insert row macro


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.
--
Janette
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Insert Current Date into cell - Macro to "Save As" Guy[_2_] Excel Worksheet Functions 4 December 12th 08 08:20 PM
Recorded single column insert in macro. Macro inserts two not one lostatlewisu Excel Programming 3 August 16th 07 01:26 AM
make a macro to insert a macro mithu Excel Discussion (Misc queries) 6 March 20th 07 06:04 PM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Insert A Row Macro Mark Williams New Users to Excel 2 September 30th 05 07:03 PM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"