易表在线答疑技术与交流用户社区 → 请教筛选问题


  共有6461人关注过本帖树形打印复制链接

主题:请教筛选问题

帅哥哟,离线,有人找我吗?
cowpoke
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:业余侠客 帖子:336 积分:690 威望:0 精华:0 注册:2006/8/14 11:36:00
请教筛选问题  发帖心情 Post By:2011/7/6 17:44:00 [只看该作者]

以三个变量进行组合筛选.搞了两天没有写出来.不知咋搞了.请教大侠公式是否有顺序错误或格式错误,抑或其它错误?
Selcase(
[A]="",FilterFor("b","=",[%b%],"c","=",[%c%]),
[b]="",FilterFor("A","=",[%A%],"c","=",[%c%]),
[c]="",FilterFor("A","=",[%A%],"b","=",[%b%]),
[A]=""and [b]="",FilterFor("c","=",[%c%]),
[A]=""and [c]="",FilterFor("b","=",[%b%]),
[b]=""and [c]="",FilterFor("A","=",[%A%]),
FilterFor("A","=",[%A%],"b","=",[%b%],"c","=",[%c%])
)

 回到顶部
帅哥哟,离线,有人找我吗?
don
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:35 积分:80 威望:0 精华:0 注册:2011/6/4 17:54:00
  发帖心情 Post By:2011/7/6 18:00:00 [只看该作者]

是否應該這樣:
Selcase(
[%A%]="",FilterFor("b","=",[%b%],"c","=",[%c%]),
[%b%]="",FilterFor("A","=",[%A%],"c","=",[%c%]),
[%c%]="",FilterFor("A","=",[%A%],"b","=",[%b%]),
[%A%]=""and [%B%]="",FilterFor("c","=",[%c%]),
[%A%]=""and [%C%]="",FilterFor("b","=",[%b%]),
[%B%]=""and [%C%]="",FilterFor("A","=",[%A%]),
FilterFor("A","=",[%A%],"b","=",[%b%],"c","=",[%c%]))

 回到顶部
帅哥哟,离线,有人找我吗?
cowpoke
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:业余侠客 帖子:336 积分:690 威望:0 精华:0 注册:2006/8/14 11:36:00
  发帖心情 Post By:2011/7/6 18:03:00 [只看该作者]

你这个明显不对,怎么把变量放前了呢.那是列内容

 回到顶部
帅哥哟,离线,有人找我吗?
wjq1072
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By:2011/7/6 20:29:00 [只看该作者]

三个变量的完全组合应该有8种情况:

If([%A%]="" And [%B%]="" And [%C%]="","",

If([%A%]="" And [%B%]="" And [%C%] <> "",FilterFor("C","=",[%C%]),
If([%A%]="" And [%B%] <> "" And [%C%]="",FilterFor("B","=",[%B%]),
If([%A%] <> "" And [%B%]="" And [%C%]="",FilterFor("A","=",[%A%]),

If([%A%]="" And [%B%] <> "" And [%C%] <> "",FilterFor("B","=",[%B%],"C","=",[%C%]),
If([%A%] <> "" And [%B%] <> "" And [%C%]="",FilterFor("B","=",[%B%],"A","=",[%A%]),
If([%A%] <> "" And [%B%]="" And [%C%] <> "",FilterFor("A","=",[%A%],"C","=",[%C%]),

FilterFor("A","=",[%A%],"B","=",[%B%],"C","=",[%C%]))))))))


 回到顶部