View Single Post
 
Old 09-28-2011, 04:11 AM
Catalin.B Catalin.B is offline Windows Vista Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Try this code:
Code:
Sub CopyRows()
Dim i As Integer, nextrow As Long

nextrow = Sheets("Sheet2").Range("A:A").End(xlUp).Row - 2
For i = 1 To 100

        If Sheets("Sheet1").Cells(i, 2).Value = "faculty" Then

       Sheets("Sheet1").Cells(i, 2).EntireRow.Copy Sheets("Sheet2").Range("A" & nextrow)
            

        End If
nextrow = nextrow + 1
    Next i
   
End Sub
Reply With Quote