Sub add()
Dim datasht As Worksheet, ASHT As Worksheet
Dim Y As Integer
Set datasht = Sheets("庫存")
Set ASHT = Sheets("未配登記")
Sheets("未配登記").Select
Selection.Borders.LineStyle = xlNone
Selection.ClearContents
datasht.Select
datasht.AutoFilterMode = flash
Y = datasht.Range("b65536").End(xlUp).Row
With datasht
Selection.AutoFilter FIELD:=4, Criteria1:="未配"
.Range("A1:i" & Y).Copy ASHT.[A1]
End With
End Sub