易表在线答疑技术与交流用户社区 → [求助]Eval()用法


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

主题:[求助]Eval()用法

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


加好友 发短信
等级:蒙面侠 帖子:2494 积分:6748 威望:0 精华:0 注册:2011/3/30 12:48:00
[求助]Eval()用法  发帖心情 Post By:2013/12/9 21:09:00 [只看该作者]

有下面公式: 

CountFor(GridName,Right([红

1],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红

2],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红

3],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红

4],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红

5],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红

6],1), "=" ,[杀1],"期号", "=" ,[期号])

我用 

Eval("CountFor(GridName,Right([红" +Substitute("1|2|3|4|5|6","|","],1), "=" ,[杀1],"期号", "=" ,[期号]) + CountFor(GridName,Right([红 ")+ "],1), "=" ,[杀1],"期号", "=" ,[期号])")

来替代,但提示语法错误。是不是双引号用得不对?请指教。谢谢!


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


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

Eval("CountFor(GridName,Right([红"+Substitute("1|2|3|4|5|6","|","],1),""="",[杀1],""期号"",""="",[期号])+CountFor(GridName,Right([红")+"],1),""="",[杀1],""期号"",""="",[期号])")

 回到顶部
美女呀,离线,留言给我吧!
dancedy
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:2721 积分:4555 威望:0 精华:0 注册:2011/5/12 17:20:00
  发帖心情 Post By:2013/12/10 9:27:00 [只看该作者]

Eval("CountFor(GridName,""红" + Substitute("1|2|3|4|5|6","|",""",""like"",""*""+[杀1],""期号"",""="",[期号]) + CountFor(GridName,""红")+ """,""like"",""*""+[杀1],""期号"",""="",[期号])")

 回到顶部
客人(58.47.*.*)
  4楼


  发帖心情 Post By:2013/12/10 14:52:00 [只看该作者]

谢谢老师。先试试看。

 回到顶部