Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why does this code not work?
Sub CopyToCompleted() Dim rFrom As Range Dim rTo As Range Dim C As Long 'Column # Dim R As Long 'Row # Set rTo = Sheets("Completed").Cells(Rows.Count, 1).End(xlUp)(1, 1) On Error Resume Next C = [B1].Column Set rFrom = Sheets("Project Report").Range(Cells(3, C), Cells(Rows.Count, C)).Find("N") If Err.Number 0 Then Exit Sub For Each R In rFrom rFrom.EntireRow.Copy rTo rFrom.EntireRow.Delete Next R End Sub What I am trying to accomplish is move all the rows where column "B" in Sheets("Project Report") ="N" to the next empty row in Sheets("Completed"). TIA Greg |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wht is this Code not Working ? | Excel Programming | |||
VBA code not working... | Excel Programming | |||
Vb Code not working | Excel Programming | |||
Code not Working - Help please | Excel Programming | |||
why this code not working | Excel Programming |