Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a worksheet with data that I need to insert 8 rows inbetween the other
rows in a spreadsheet. I tried creating a Macro but it records the cell reference and just adds 8 rows at the same spot. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Range(ActiveCell.Address & ":" & _
ActiveCell.Offset(7, 0).Address).Insert _ Shift:=xlDown will insert 8 rows starting at the cursor. -- Hope this helps. If this post was helpfull, please remember to click on the ''''YES'''' button at the bottom of the screen. Thanks, Gary Brown "GM" wrote: I have a worksheet with data that I need to insert 8 rows inbetween the other rows in a spreadsheet. I tried creating a Macro but it records the cell reference and just adds 8 rows at the same spot. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
My guess is that you're only inserting a row for a particular cell. Try this:
Range("B5").EntireRow.Insert shift:=xlDown -- -SA "GM" wrote: I have a worksheet with data that I need to insert 8 rows inbetween the other rows in a spreadsheet. I tried creating a Macro but it records the cell reference and just adds 8 rows at the same spot. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're absolutely right! Insert rows example below...
Range(ActiveCell.Row() & ":" & _ ActiveCell.Offset(7, 0).Row).Insert _ Shift:=xlDown -- Hope this helps. If this post was helpfull, please remember to click on the ''''YES'''' button at the bottom of the screen. Thanks, Gary Brown "StumpedAgain" wrote: My guess is that you're only inserting a row for a particular cell. Try this: Range("B5").EntireRow.Insert shift:=xlDown -- -SA "GM" wrote: I have a worksheet with data that I need to insert 8 rows inbetween the other rows in a spreadsheet. I tried creating a Macro but it records the cell reference and just adds 8 rows at the same spot. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
GM wrote:
I have a worksheet with data that I need to insert 8 rows inbetween the other rows in a spreadsheet. I tried creating a Macro but it records the cell reference and just adds 8 rows at the same spot. From the help file... If you want the macro to run relative to the position of the active cell, record it using relative cell references. On the Stop Recording toolbar, click Relative Reference so that it is selected. Excel will continue to record macros with relative references until you quit Excel or until you click Relative Reference again, so that it is not selected. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a macro to delete multiple rows? | Excel Discussion (Misc queries) | |||
Create a macro to delete rows if value is less than a specified nu | Excel Worksheet Functions | |||
how do I create a macro to auto insert rows? | Excel Worksheet Functions | |||
Create a Macro that will copy the rows that have a value < 0 | Excel Discussion (Misc queries) | |||
HOW DO I CREATE A MACRO TO STRIP OUT ROWS? | Excel Discussion (Misc queries) |