View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Cut and Paste Error

My program is searching for a row that has the following
characteristics. When it finds the row, it pastes the
row into the third line. However, if the row was already
in the third line, I get an error. The problem is that I
have no idea where the line is going to show up, so I
can't just start at the forth line. Thank you.

i=3
For n = 3 To FinalRow
If Not ((Range("A" & n).Value) = "") And (Range("B" &
n).Value) = 1 Then
Rows(n & ":" & n).Cut
Rows(i & ":" & i).Insert Shift:=xlDown
End If
Next n