Try this code. I have not used autofilter but the code will go thru each row and action accordingly.
![]()
Option Explicit Dim lrow As Long Dim i As Long Sub copy_data() With Worksheets(1) lrow = .Range("A" & Rows.Count).End(xlUp).Row For i = 2 To lrow If .Range("C" & i).Value = "Yes" And .Range("D" & i).Value = "N/A" Then Worksheets(2).Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = .Range("A" & i).Value Worksheets(2).Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Value = "Not Taken Exam" Worksheets(2).Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Value = Date End If Next i End With End Sub
Bookmarks