Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to insert a row (row 1 of sheet 2) in between any row in
sheet1 where the value in column A changes. I have found code that inserts a blank row but I don't know how to change it so it copies the row from sheet 2 instead. Thanks in advance... here is the code so far. Sub InsertRowAtChangeInValue() Dim lRow As Long For lRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row To 2 Step -1 If Cells(lRow, "A") < Cells(lRow - 1, "A") Then Rows (lRow).EntireRow.Insert Next lRow End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to copy and paste values (columns)I have a macro file built | Excel Programming | |||
AutoRun Macro with a delay to give user the choice to cancel the macro | Excel Programming | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |