Sub acard()
Set ws1 = Worksheets("Sheet1")
Set ws2 = Worksheets("Sheet2")
Set CheckRange = ws1.Range("H5:H" & ws1.Cells(Rows.Count, "H").End(xlUp).Row)
OpenRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row + 1
For Each Cell In CheckRange
If UCase(Cell.Value) = "YES" Then
ws2.Range("A" & OpenRow & ":H" & OpenRow).Value = _
ws1.Range("A" & Cell.Row & ":H" & Cell.Row).Value
OpenRow = OpenRow + 1
End If
Next
ws2.Range("$A$5:$H$" & OpenRow - 1).RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7)
End Sub
Bookmarks