Posted to microsoft.public.excel.programming
|
|
Macro that cut and pastes
Thank you for your help.
Shannon
-----Original Message-----
Shannon
Try this on a backup copy of your data
Sub MoveRows()
Dim lFrom As Long
Dim lTo As Long
For lFrom = Range("a" & Rows.Count).End(xlUp).Row To 1
Step -1
If UCase(Cells(lFrom, "a")) = "B" Then
Range("a" & lFrom & ":n" & lFrom).Cut
lTo = Range("p" & Rows.Count).End(xlUp).Row + 1
Range("p" & lTo).Select
ActiveSheet.Paste
Range("a" & lFrom & ":n" & lFrom).Delete Shift:=xlUp
End If
Next
End Sub
---
Message posted from http://www.ExcelForum.com/
.
|