Erenagh,
Could give this a try:
Dim ws1 As Worksheet: Set ws1 = Sheets("Sheet1")
Dim ws2 As Worksheet: Set ws2 = Sheets("Sheet2")
Dim ws2DestRow As Long: ws2DestRow = 1
Dim z As Long
For z = 4 To ws1.Cells(Rows.Count, "A").End(xlUp).Row
If Trim(LCase(ws1.Cells(z, "A").Value)) = "y" _
And Trim(ws1.Cells(z, "B").Value) = vbNullString Then
ws2.Range("C" & ws2DestRow).EntireRow.Value = ws1.Cells(z, "A").EntireRow.Value
ws2DestRow = ws2DestRow + 1
ElseIf Trim(LCase(ws1.Cells(z, "A").Value)) = "y" _
And Trim(LCase(ws1.Cells(z, "C").Value)) = "y" Then
ws2.Range("C" & ws2DestRow).EntireRow.Value = ws1.Cells(z, "A").EntireRow.Value
ws2DestRow = ws2DestRow + 1
End If
Next
Hope that helps,
~tigeravatar
Bookmarks