Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm rather new to macro-programming...
I want a macro to insert blank rows beneath the active row (or cell) and then copy the active row to the first blank row beneath the row with content. By using "Register macro" I have made a macro like this: Sub Makro1() ' ' Makro1 Makro ' ' Hurtigtast: CTRL+m ' Rows("6:10").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("5:5").Select Selection.Copy Rows("6:6").Select ActiveSheet.Paste Application.CutCopyMode = False End Sub The problem is that if the cursor is pointing at for instance row 12, and I activate the macro by ctrl+m, the blank rows still are inserted beneath row 5, not beneath row 12. Kjell |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to insert value from range on different sheet and copy sheet | Excel Programming | |||
Prevent insert/delete rows - sheet code | Excel Programming | |||
How do you insert rows in a sheet that has a PivotTable | Excel Programming | |||
Insert Rows in Balance Sheet Template | New Users to Excel | |||
In Excell sheet i want to insert more than 65,536 rows how i can . | Excel Worksheet Functions |