Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tuesday, August 7, 2018 at 7:58:51 PM UTC+10, Claus Busch wrote:
Hi Mark, Am Tue, 7 Aug 2018 02:45:51 -0700 (PDT) schrieb Living the Dream: No idea why it posted when I wasn't finished, but! here we go again: For each c in myRng If Not c = "" then with c .Resize(6).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove .offset(7, 0).select End with End if Next c try: Sub InsertRows() Dim LRow As Long, i As Long With ActiveSheet LRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = LRow To 2 Step -1 .Rows(i).Resize(6).Insert .Range(.Cells(i, 1), .Cells(i + 5, 1)).Value = .Cells(i + 6, 1).Value Next End With End Sub Regards Claus B. -- Windows10 Office 2016 Hi Claus As always, ever reliable and supremely quick with a handing code. That worked a treat, thank you. Cheers Mark. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop for myRng for next set of 9 rows | Excel Programming | |||
insert rows and copying cells in column b,c, and d into new rows | Excel Programming | |||
Insert rows: Formats & formulas extended to additonal rows | Excel Worksheet Functions | |||
Insert page breaks every 50 rows but do not include hidden rows | Excel Programming | |||
range("myrng"), names("myrng").RefersToRange?? | Excel Programming |