你好, 我又試了篩選LIST的部門是HRA, 再COPY 只有部門是HRA的工作表, 但又是全部都COPY出工作表(HRA, ACC)[attach]25759[/attach][attach]25759[/attach][attach]25759[/attach], 請問下列CODE有甚麼欠缺?
Sub copytosheetok3()
Dim Rng As Range
Dim theRow As Range
Dim theArea As Range
With Sheets("list")
Set Rng = .UsedRange
Rng.AutoFilter Field:=2, Criteria1:="HRA" '¿z¿ï
Set Rng = Rng.Resize(Rng.Rows.Count - 1).Offset(1, 0).SpecialCells(xlCellTypeVisible)
End With
Dim MyCell As Range, MyRange As Range
Set MyRange = Sheets("list").Range("A2")
Set MyRange = Range(MyRange, MyRange.End(xlDown))