我的代码存在问题,我无法解决。我使用了一个高级过滤器,但它现在想要复制并通过“独特过滤项目”到另一个工作表。 当我运行下面的代码时,它看起来好像它试图复制到Sheet2(表1_Pipes),但条目是空白的?
有人可以帮忙吗?感谢
Sub Uniques()
Dim ColRange As Range
Dim PrintRange As Range
On Error GoTo Errorcatch
Set ColRange = Application.InputBox("Please Select Input Data To Gather Uniques From", "Obtain Range Object", Type:=8)
Set PrintRange = Sheets("Take Off").Range("D5001")
ColRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=PrintRange, Unique:=True
Worksheets("Take Off").Range("A11:AI5000").AutoFilter _
field:=4, _
Criteria1:="<>*-*", _
VisibleDropDown:=True
Range("D5001:D5010").Select
Selection.Cut
Sheets("Table 1_Pipes").Select
Range("B6").Select
ActiveSheet.Paste
Exit Sub
Errorcatch:
MsgBox Err.Description
End Sub