PDA

View Full Version : Solved: Moving row to another space



Klartigue
09-12-2011, 12:42 PM
On the attached sheet, I would like to move the cash row in A6 and insert it above the total portfolio row in A63. The complicated part of this is that although the cash row will always be in A6, the portfolio row will be located anywhere based on different reports.

How do I write a macro to find the total portfolio line and know to move row A6 and insert it above that line?

Thanks for the great help!

Bob Phillips
09-12-2011, 12:58 PM
Public Sub ProcessData()
Dim Lastrow As Long

With ActiveSheet

Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Rows(6).Copy
.Rows(Lastrow).Insert
End With
End Sub

Klartigue
09-12-2011, 01:10 PM
Thank you!!