excel大神帮忙解答,为什么这段宏代码运行会报400的错误?
将sheet1的H:J列,复制一下,新建sheet2页,粘贴进去Columns("H:J").SelectSelection.CopySheets.AddAfter:=S...
将sheet1的H:J列,复制一下,新建sheet2页,粘贴进去
Columns("H:J").Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
ActiveSheet.Paste
Columns("A:C").Select
Application.CutCopyMode = False
前后代码是这样的:
Range("G9").Select
Columns("A:C").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"E1:G4"), CopyToRange:=Columns("H:J"), Unique:=False
Columns("H:J").Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Columns("A:C").Select
ActiveSheet.Paste
Columns("A:C").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$C$28").AutoFilter Field:=1, Criteria1:="<>*包水灵*", _
Operator:=xlAnd 展开
Columns("H:J").Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
ActiveSheet.Paste
Columns("A:C").Select
Application.CutCopyMode = False
前后代码是这样的:
Range("G9").Select
Columns("A:C").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"E1:G4"), CopyToRange:=Columns("H:J"), Unique:=False
Columns("H:J").Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Columns("A:C").Select
ActiveSheet.Paste
Columns("A:C").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$C$28").AutoFilter Field:=1, Criteria1:="<>*包水灵*", _
Operator:=xlAnd 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询