This is all you need:
Sub M_snb() sn = Cells(1).CurrentRegion ReDim sp(UBound(sn), UBound(sn, 2)) c00=inputbox("filter item") For j = 2 To UBound(sn) If sn(j, 1) = c00 or sn(j, 1) = Val(c00)Then sp(n, 0) = j For jj = 1 To UBound(sn, 2) sp(n, jj) = sn(j, jj) Next n = n + 1 End If Next If not Isempty(n) Then Workbooks.Add.Sheets(1).Cells(1).Resize(n, UBound(sp, 2)+1) = sp End Sub