以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  自动筛选问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=172273)

--  作者:jick0526
--  发布时间:2021/10/5 16:01:00
--  自动筛选问题
老师,我想做个按钮,当点击按钮时会自动筛选出A列和B列不为空的行,代码要怎么写,谢谢!
[此贴子已经被作者于2021/10/5 23:14:17编辑过]

--  作者:z769036165
--  发布时间:2021/10/6 9:51:00
--  
Tables("表A").Filter = "A列 is not null and B列 is not null"
--  作者:jick0526
--  发布时间:2021/10/7 17:01:00
--  
老师,请问下这个代码如果同时再增加一个条件就是且B列里面有“出售”和“进货”的行,该怎么增加代码,谢谢!

Tables("表A").Filter = "A列 is not null and B列 is not null"

--  作者:有点蓝
--  发布时间:2021/10/7 17:02:00
--  
Tables("表A").Filter = "A列 is not null and B列 in (\'出售\',\'进货\')"
或者
Tables("表A").Filter = "A列 is not null and (B列=\'出售\' or B列=\'进货\')"