Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following macro and I need one additional step after it finished the macro. The initial macro added 10 rows until the last person is there, but there are values in b1, b10,b20, etc and I need those values to cut and pasted in a10, a15 and so on until the last value has been posted. If somebody can help I would really appreciate it.
Sub insert_rows( Dim lastrow As Lon Dim row_index As Lon lastrow = ActiveSheet.Cells(rows.Count, "A").End(xlUp).ro For row_index = lastrow - 1 To 1 Step - If Cells(row_index, "A").Value < Cells(row_index + 1, "A").Value The Cells(row_index + 1, "A").Resize(10, 1).EntireRow.insert (xlShiftDown Range(Selection, Selection.End(xlDown)).Selec Range(Selection, Selection.End(xlToRight)).Selec End I Nex End Su |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros to copy and paste data | Excel Discussion (Misc queries) | |||
Problem with copy and paste together with macros | Excel Worksheet Functions | |||
Working with Macros-Activesheet.Paste | Excel Discussion (Misc queries) | |||
Copy and Paste Macros | Excel Discussion (Misc queries) | |||
cut and paste macros along with lookup | Excel Programming |