英文:
Uncheck filter in excel VBA
问题
ActiveSheet.Range("&A$12:$AM$31570").AutoFilter Field:=16, Criteria1:=Array("0", "1", "2", "3", "4"), Operator:=xlFilterValues
英文:
I am working on creating a filter macro in excel. I need to filter out (uncheck) few of the items for example value 10 or 11 needs to be excluded and rest of the values are fine. We have an unknown amount of values in the column. only values needs to be excluded are 10 and 11. Any help is appreciated.
ActiveSheet.Range("$A$12:$AM$31570").AutoFilter Field:=16, Criteria1:=Array("0", "1", "2", "3", "4"), Operator:=xlFilterValues
答案1
得分: 1
你可以这样做,如果要从筛选中排除值10和11:
ActiveSheet.Range("$A$12:$AM$31570").AutoFilter Field:=16, Criteria1:="<>10", Operator:=xlAnd, Criteria2:="<>11"
英文:
You could do the following if you want to exclude values 10 and 11 from your filter:
ActiveSheet.Range("$A$12:$AM$31570").AutoFilter Field:=16, Criteria1:="<>10", Operator:=xlAnd, Criteria2:="<>11"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论