Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all
I want to insert rows with first column 2012-2050 if a column is 2011. I have written this code. Executing it, it will insert a lot of values after 2011 but then not go to the next column, which it should. any ideas? Dim last, limit, i, d, j As Integer last = 2011 limit = 3000 d = 2050 - last For i = 1 To limit If ActiveSheet.Cells(i, 1).Value = last Then For j = last To 2050 ActiveSheet.Range(Rows(i), Rows(i)).Select Selection.Insert Shift:=xlDown Cells(i, 1) = j Next j End If Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert rows in a worksheet that do not change adjoining rows | Excel Discussion (Misc queries) | |||
How do i insert blank rows between data that is thousands of rows | Excel Discussion (Misc queries) | |||
Insert rows: Formats & formulas extended to additonal rows | Excel Worksheet Functions | |||
How do I insert blank rows between rows in completed worksheet? | Excel Discussion (Misc queries) | |||
How do i insert of spacer rows between rows in large spreadsheets | Excel Discussion (Misc queries) |