View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default Slection of Rows on a Condition

try this one (changed a bit to speed up courses the color check)

Sub AchieveCol()

Sheets("Projects-06").Activate
Dim r, rw, t
r = Range("A65500").End(xlUp).Row
rw = 1
For t = 2 To r
If Cells(t, 3) < 0 And Cells(t, 4) = "Y" Then
rw = rw + 1
Range("A" & t & ":D" & t).Copy Destination:=Sheets("Blank").Range("A" & rw &
":D" & rw)
End If
Next

End Sub


"Ananth" skrev:

Thanks very much; It worked.
Is it possible to retain the formating properties; For example, I have
colored a row in Green,. I would like to contine see that row in green in the
"Blank" worksheet also

"excelent" wrote:

change
If Cells(t, 3) 0 And Cells(t, 4) = "Y" Then
to
If Cells(t, 3) < 0 And Cells(t, 4) = "Y" Then