View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_306_] mudraker[_306_] is offline
external usenet poster
 
Posts: 1
Default Macro that cut and pastes

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/