Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apologies for the re-post but I originally posted this request into the wrong
forum! I need to insert a new row into a workbook where a character in Column "A" = "D" and then copy the row which is two rows above into the new inserted row. I can insert the row ok with the following code; Sub Add_Rows() Dim lastrow As Long, i As Long lastrow = Cells(Rows.Count, 1).End(xlUp).Row For i = lastrow To 2 Step -1 If Cells(i, 1) = "D" Then Rows(i).Insert End If Next End Sub but what I can't do is copy the cells in 2 rows above this newly inserted row? .. I have been searching and reading numerous threads and links but to no avail. Can anyone assist?, i am using 2003. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200604/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I copy a header to insert on multilpe sheets in a workbook | Excel Discussion (Misc queries) | |||
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook | Excel Programming | |||
create a copy of a sheet and insert it into the same workbook. | Excel Programming | |||
create a copy of a sheet and insert it into the same workbook. | Excel Programming | |||
Insert Row & copy all formulas - shared workbook | Excel Programming |