易表在线答疑技术与交流用户社区 → [求助]求助一个公式。可能有些难。


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

主题:[求助]求助一个公式。可能有些难。

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


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By:2013/11/29 12:25:00 [显示全部帖子]

可以做一个按钮公式(0-9列的列名称更改为:00-09)如下:

EvalFor(GridName,"00","If(Instr(""0"",[数据])>-1,""0"","""")") And EvalFor(GridName,"p","Cell(Row,""00"")=""0"" And Cell(Row-1,""00"")=""0"" And Cell(Row-2,""00"")=""0"" Or Cell(Row,""00"")=""0"" And Cell(Row-1,""00"")=""0"" And Cell(Row+1,""00"")=""0"" Or Cell(Row,""00"")=""0"" And Cell(Row+1,""00"")=""0"" And Cell(Row+2,""00"")=""0""") And MarkColFor("00",255,0,"p","=",-1) And EvalFor(GridName,"01","If(Instr(""1"",[数据])>-1,""1"","""")") And EvalFor(GridName,"p","Cell(Row,""01"")=""1"" And Cell(Row-1,""01"")=""1"" And Cell(Row-2,""01"")=""1"" Or Cell(Row,""01"")=""1"" And Cell(Row-1,""01"")=""1"" And Cell(Row+1,""01"")=""1"" Or Cell(Row,""01"")=""1"" And Cell(Row+1,""01"")=""1"" And Cell(Row+2,""01"")=""1""") And MarkColFor("01",255,0,"p","=",-1) And EvalFor(GridName,"02","If(Instr(""2"",[数据])>-1,""2"","""")") And EvalFor(GridName,"p","Cell(Row,""02"")=""2"" And Cell(Row-1,""02"")=""2"" And Cell(Row-2,""02"")=""2"" Or Cell(Row,""02"")=""2"" And Cell(Row-1,""02"")=""2"" And Cell(Row+1,""02"")=""2"" Or Cell(Row,""02"")=""2"" And Cell(Row+1,""02"")=""2"" And Cell(Row+2,""02"")=""2""") And MarkColFor("02",255,0,"p","=",-1) And EvalFor(GridName,"03","If(Instr(""3"",[数据])>-1,""3"","""")") And EvalFor(GridName,"p","Cell(Row,""03"")=""3"" And Cell(Row-1,""03"")=""3"" And Cell(Row-2,""03"")=""3"" Or Cell(Row,""03"")=""3"" And Cell(Row-1,""03"")=""3"" And Cell(Row+1,""03"")=""3"" Or Cell(Row,""03"")=""3"" And Cell(Row+1,""03"")=""3"" And Cell(Row+2,""03"")=""3""") And MarkColFor("03",255,0,"p","=",-1) And EvalFor(GridName,"04","If(Instr(""4"",[数据])>-1,""4"","""")") And EvalFor(GridName,"p","Cell(Row,""04"")=""4"" And Cell(Row-1,""04"")=""4"" And Cell(Row-2,""04"")=""4"" Or Cell(Row,""04"")=""4"" And Cell(Row-1,""04"")=""4"" And Cell(Row+1,""04"")=""4"" Or Cell(Row,""04"")=""4"" And Cell(Row+1,""04"")=""4"" And Cell(Row+2,""04"")=""4""") And MarkColFor("04",255,0,"p","=",-1) And EvalFor(GridName,"05","If(Instr(""5"",[数据])>-1,""5"","""")") And EvalFor(GridName,"p","Cell(Row,""05"")=""5"" And Cell(Row-1,""05"")=""5"" And Cell(Row-2,""05"")=""5"" Or Cell(Row,""05"")=""5"" And Cell(Row-1,""05"")=""5"" And Cell(Row+1,""05"")=""5"" Or Cell(Row,""05"")=""5"" And Cell(Row+1,""05"")=""5"" And Cell(Row+2,""05"")=""5""") And MarkColFor("05",255,0,"p","=",-1) And EvalFor(GridName,"06","If(Instr(""6"",[数据])>-1,""6"","""")") And EvalFor(GridName,"p","Cell(Row,""06"")=""6"" And Cell(Row-1,""06"")=""6"" And Cell(Row-2,""06"")=""6"" Or Cell(Row,""06"")=""6"" And Cell(Row-1,""06"")=""6"" And Cell(Row+1,""06"")=""6"" Or Cell(Row,""06"")=""6"" And Cell(Row+1,""06"")=""6"" And Cell(Row+2,""06"")=""6""") And MarkColFor("06",255,0,"p","=",-1) And EvalFor(GridName,"07","If(Instr(""7"",[数据])>-1,""7"","""")") And EvalFor(GridName,"p","Cell(Row,""07"")=""7"" And Cell(Row-1,""07"")=""7"" And Cell(Row-2,""07"")=""7"" Or Cell(Row,""07"")=""7"" And Cell(Row-1,""07"")=""7"" And Cell(Row+1,""07"")=""7"" Or Cell(Row,""07"")=""7"" And Cell(Row+1,""07"")=""7"" And Cell(Row+2,""07"")=""7""") And MarkColFor("07",255,0,"p","=",-1) And EvalFor(GridName,"08","If(Instr(""8"",[数据])>-1,""8"","""")") And EvalFor(GridName,"p","Cell(Row,""08"")=""8"" And Cell(Row-1,""08"")=""8"" And Cell(Row-2,""08"")=""8"" Or Cell(Row,""08"")=""8"" And Cell(Row-1,""08"")=""8"" And Cell(Row+1,""08"")=""8"" Or Cell(Row,""08"")=""8"" And Cell(Row+1,""08"")=""8"" And Cell(Row+2,""08"")=""8""") And MarkColFor("08",255,0,"p","=",-1) And EvalFor(GridName,"09","If(Instr(""9"",[数据])>-1,""9"","""")") And EvalFor(GridName,"p","Cell(Row,""09"")=""9"" And Cell(Row-1,""09"")=""9"" And Cell(Row-2,""09"")=""9"" Or Cell(Row,""09"")=""9"" And Cell(Row-1,""09"")=""9"" And Cell(Row+1,""09"")=""9"" Or Cell(Row,""09"")=""9"" And Cell(Row+1,""09"")=""9"" And Cell(Row+2,""09"")=""9""") And MarkColFor("09",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""00"")=""0"" And Cell(Row+1,""01"")=""1"" And Cell(Row+2,""02"")=""2""") And MarkColFor("00",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""01"")=""1"" And Cell(Row-1,""00"")=""0"" And Cell(Row+1,""02"")=""2"" Or Cell(Row,""01"")=""1"" And Cell(Row+1,""02"")=""2"" And Cell(Row+2,""03"")=""3""") And MarkColFor("01",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""02"")=""2"" And Cell(Row-1,""01"")=""1"" And Cell(Row+1,""03"")=""3"" Or Cell(Row,""02"")=""2"" And Cell(Row+1,""03"")=""3"" And Cell(Row+2,""04"")=""4"" Or Cell(Row,""02"")=""2"" And Cell(Row-1,""01"")=""1"" And Cell(Row-2,""00"")=""0""") And MarkColFor("02",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""03"")=""3"" And Cell(Row-1,""02"")=""2"" And Cell(Row+1,""04"")=""4"" Or Cell(Row,""03"")=""3"" And Cell(Row+1,""04"")=""4"" And Cell(Row+2,""05"")=""5"" Or Cell(Row,""03"")=""3"" And Cell(Row-1,""02"")=""2"" And Cell(Row-2,""01"")=""1""") And MarkColFor("03",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""04"")=""4"" And Cell(Row-1,""03"")=""3"" And Cell(Row+1,""05"")=""5"" Or Cell(Row,""04"")=""4"" And Cell(Row+1,""05"")=""5"" And Cell(Row+2,""06"")=""6"" Or Cell(Row,""04"")=""4"" And Cell(Row-1,""03"")=""3"" And Cell(Row-2,""02"")=""2""") And MarkColFor("04",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""05"")=""5"" And Cell(Row-1,""04"")=""4"" And Cell(Row+1,""06"")=""6"" Or Cell(Row,""05"")=""5"" And Cell(Row+1,""06"")=""6"" And Cell(Row+2,""07"")=""7"" Or Cell(Row,""05"")=""5"" And Cell(Row-1,""04"")=""4"" And Cell(Row-2,""03"")=""3""") And MarkColFor("05",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""06"")=""6"" And Cell(Row-1,""05"")=""5"" And Cell(Row+1,""07"")=""7"" Or Cell(Row,""06"")=""6"" And Cell(Row+1,""07"")=""7"" And Cell(Row+2,""08"")=""8"" Or Cell(Row,""06"")=""6"" And Cell(Row-1,""05"")=""5"" And Cell(Row-2,""04"")=""4""") And MarkColFor("06",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""07"")=""7"" And Cell(Row-1,""06"")=""6"" And Cell(Row+1,""08"")=""8"" Or Cell(Row,""07"")=""7"" And Cell(Row+1,""08"")=""8"" And Cell(Row+2,""09"")=""9"" Or Cell(Row,""07"")=""7"" And Cell(Row-1,""06"")=""6"" And Cell(Row-2,""05"")=""5""") And MarkColFor("07",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""08"")=""8"" And Cell(Row-1,""07"")=""7"" And Cell(Row+1,""09"")=""9"" Or Cell(Row,""08"")=""8"" And Cell(Row-1,""07"")=""7"" And Cell(Row-2,""06"")=""6""") And MarkColFor("08",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""09"")=""9"" And Cell(Row-1,""08"")=""8"" And Cell(Row-2,""07"")=""7""") And MarkColFor("09",255,0,"p","=",-1)


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


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By:2013/11/29 15:49:00 [显示全部帖子]

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


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


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By:2013/11/30 13:33:00 [显示全部帖子]

以下是引用沙尘豹在2013-11-30 11:29:00的发言:

谢谢老师编辑这么长的公式,我知道很难的。60多行的公式,错一个小点,一个空格,公式都不能运算。

 

老师有强大的逻辑思维,严谨的态度,超级的耐心,才能编辑这么长这么复杂的公式。

 

我看到公式彻底蒙圈了,老师又给发了现成的 表。真心的感谢。

 

我在表的选项点 公式管理器 只有表预处理公式。在窗口选项点 设计录入窗口 也没有找到公式。

 

那么 这么长的公式在哪里呢? 我想套用老师的公式,或改动公式里一部分另作表要以下结果。

 (表1) 如果我只想要 竖向挨着3个或3个以上,背景变红色。

 (表2)斜向也是挨着3个或3个以上,背景变红色 ,这回我不要1,2,3变红色了,我要3,2,1背景变红色。

 (表3)把表1和表2的结果合并。就是竖向挨着3个或3个以上,背景变红色,斜向也是挨着3个或3个以上

背景变红色,3,2,1背景变红色,小斜。

 

请老师指点,在哪里可以找到老师的公式,为什么公式管理器里 只有表预处理公式OpenWindow(1) And Do(503)

 

不会这一个公式全搞定了吧。那么长的公式在哪里呢?

 

学会举一反三,就不用经常麻烦老师了。

===================================

按钮公式在哪里都不知道?打开窗口设计、双击按钮看看!

[此贴子已经被作者于2013-11-30 11:39:33编辑过]


 回到顶部