Sub Test()
Application.ScreenUpdating = False
Dim Lastrow As Long
Lastrow = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row + 1
If Cells(1, "B").Value = "Pending" Or Cells(1, "B").Value = "Yes" Then
Sheets(1).Cells(1, "A").Copy Destination:=Sheets(2).Cells(Lastrow, "A")
End If
Application.ScreenUpdating = True
End Sub
ADVERTISEMENT
Sub Pending()
Application.ScreenUpdating = False
Dim Lastrow As Long
Dim Lastrowa As Long
Lastrow = Sheets(1).Cells(Rows.Count, "DT").End(xlUp).Row
Lastrowa = Sheets(2).Cells(Rows.Count, "DT").End(xlUp).Row + 1
Dim i As Long
For i = 1 To Lastrow
If Sheets(1).Cells(i, "DT").Value = "Pending" Or Cells(i, "DT").Value = "Yes" Then
Sheets(1).Cells(i, "C").Copy Destination:=Sheets(2).Cells(Lastrowa, "C")
Sheets(1).Cells(i, "D").Copy Destination:=Sheets(2).Cells(Lastrowa, "B")
Sheets(1).Cells(i, "DV").Copy Destination:=Sheets(2).Cells(Lastrowa, "E")
Lastrowa = Lastrowa + 1
End If
Next
Application.ScreenUpdating = True
End Sub
That worked like a charm! I also took your advice and changed it to use the worksheet names. Thanks soooo much!!!