我想要再庫別那一欄中尋找包含B,C,D,E等字眼的然後再品質那一欄輸入對應的B,C,D,E
是了幾次都沒辦法成功
請問下面要如何修改?- Sub 品質_後來的()
- n = Range("AG65536").End(xlUp).Offset(1).Row
- x = Range("A65536").End(xlUp).Row
- w = Array("*B*", "*C*", "*D*", "*E*")
- y = Array("B", "C", "D", "E")
- Selection.AutoFilter Field:=33, Criteria1:="="
- For i = LBound(w) To UBound(w)
- Selection.AutoFilter Field:=14, Criteria1:="=w(i)"
- Range(Cells(n, "AG"), Cells(x, "AG")).SpecialCells(xlCellTypeVisible) = "" & y(i) & ""
- Next
- Selection.AutoFilter Field:=14
- Range(Cells(n, "AG"), Cells(x, "AG")).SpecialCells(xlCellTypeVisible) = "A"
- Selection.AutoFilter Field:=33
- End Sub
複製代碼- Sub 品質_原先的()
- n = Range("AG65536").End(xlUp).Offset(1).Row
- x = Range("A65536").End(xlUp).Row
- w= Array("B", "C", "D", "E")
- Selection.AutoFilter Field:=33, Criteria1:="="
- For i = LBound(w) To UBound(w)
- Selection.AutoFilter Field:=14, Criteria1:="="* "& w(i) &""
- Range(Cells(n, "AG"), Cells(x, "AG")).SpecialCells(xlCellTypeVisible) = "" & w(i) & ""
- Next
- Selection.AutoFilter Field:=14
- Range(Cells(n, "AG"), Cells(x, "AG")).SpecialCells(xlCellTypeVisible) = "A"
- Selection.AutoFilter Field:=33
- End Sub
複製代碼
自動篩選陣列.rar (19.65 KB)
|