易表在线答疑技术与交流用户社区 → [求助]刷新公式


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

主题:[求助]刷新公式

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


加好友 发短信
等级:论坛游民 帖子:189 积分:1100 威望:0 精华:0 注册:2006/10/15 14:22:00
[求助]刷新公式  发帖心情 Post By:2012/10/25 20:16:00 [只看该作者]

我想用IF与Countfor函数写刷新公式.像下面这样写,结果提示表达式不正确.

If([考号] <= CountFor(Grid,"班级", "<=" ,"1"),第一考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"2"),第二考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"3"),第三考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"4"),第四考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"5"),第五考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"6"),第六考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"7"),第七考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"8"),第八考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"9"),第九考室,If([考号] <= CountFor(Grid,"班级", "<=" ,"10"),第十考室,第十一考室))))))))))

意思就是如果考号小于等于班级为1的数量时,考室为第一考室;如果考号大于班级为1的数量而小于等于班级为1与2的数量和时,考室为第二考室...........

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:89.egd

[此贴子已经被作者于2012-10-25 20:16:20编辑过]

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


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

按钮公式

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:9999.egd


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


加好友 发短信
等级:论坛游民 帖子:189 积分:1100 威望:0 精华:0 注册:2006/10/15 14:22:00
  发帖心情 Post By:2012/10/26 9:16:00 [只看该作者]

Eval("EvalFor(Grid,""考室"","""+Substitute(Substitute(Eval("Substitute(""|@|"",""|"","""+Substitute(ListFor(Grid,"班级",1),"|",""")+""|""+Substitute(""|@|"",""|"",""")+""")"),"@",""",1,CountFor(Grid,""班级"",""="","),"|","))

 

什么意思?能解释一下吗?

 


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


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

回贴首先应该说明有没有解决问题?

 

SortCol("总分",2) And EvalFor(Grid,"考号","Row") And
EvalFor(Grid,"考室","1",1,CountFor(Grid,"班级","=",1)) And SortCol("考室",1) And
EvalFor(Grid,"考室","2",1,CountFor(Grid,"班级","=",2)) And SortCol("考室",1) And
EvalFor(Grid,"考室","3",1,CountFor(Grid,"班级","=",3)) And SortCol("考室",1) And
EvalFor(Grid,"考室","4",1,CountFor(Grid,"班级","=",4)) And SortCol("考室",1) And
EvalFor(Grid,"考室","5",1,CountFor(Grid,"班级","=",5)) And SortCol("考室",1) And
EvalFor(Grid,"考室","6",1,CountFor(Grid,"班级","=",6)) And SortCol("考室",1) And
EvalFor(Grid,"考室","7",1,CountFor(Grid,"班级","=",7)) And SortCol("考室",1) And
EvalFor(Grid,"考室","8",1,CountFor(Grid,"班级","=",8)) And SortCol("考室",1) And
EvalFor(Grid,"考室","9",1,CountFor(Grid,"班级","=",9)) And SortCol("考室",1) And
EvalFor(Grid,"考室","10",1,CountFor(Grid,"班级","=",10)) And SortCol("考室",1) And
SortCol("考号",1) And
EvalFor(Grid,"考室编号","CountFor(Grid,""考室"",""="",[考室],1,Row)")

[此贴子已经被作者于2012-10-26 10:48:24编辑过]

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


加好友 发短信
等级:论坛游民 帖子:189 积分:1100 威望:0 精华:0 注册:2006/10/15 14:22:00
  发帖心情 Post By:2012/10/26 11:01:00 [只看该作者]

谢谢了完全满足我的要求。


 回到顶部