This will do the same:

Sub snb()
  with sheets("sheet1").cells(1).currentregion
    .autofilter 1,"="
    intersect(.offset,.offset(1)).copy sheets("sheet2").cells(rows.count,1).end(xlup).offset(1)
    .autofilter
  end with
End Sub
PS.. Adjust the sheetnames to those in the workbook
Adjust the filtercriterion if necessary